Passing on request parameters

This may seem rudimentary, but I couldn't find the answer in the forums. I'm wondering how I can get around this problem without setting a session parameter.
Here"s the situation " you go to a page, passing in a request param " the next page stores the request param in a hidden form field. You view source " you see your hidden field with the correct value. When the form submitted, it doesn"t submit any value for your hidden form field.
Example:
User clicks (for example):
http://www.foo.com/page1.jsp?color=red
In page1.jsp:
<form name="FooForm" method="get" action="/myServlet">
     <input type="text" name="email">
     <input type="hidden" name="requestedcolor" value="<%=request.getParameter("color") %>">
     <input type="submit" name="submit" value="submit">
</form>
You view page source, you can see your hidden field ("requestedcolor") containing the value "red".
User types their email address and submits the form.
The submitted form has no value for the hidden field "requestedcolor"! It's an empty String. It had a value before the submit, but not during the submit.
Your reply would be greatly appreciated.

Here's a three-file example of the problem I'm having. I just typed this up - and tried running it on my home resin server. No problem - works like a charm. I feel certain this does NOT work on the WebLogic 5.1 server at work (the "pooltime" hidden form field does not reach the final page, result.jsp - although in practice, I am submitting to a servlet that's writing to a db). I recall another job where we had WebLogic 5.1, and people passed <<session>> variables instead of request, because they weren't able to propagate request variables beyond one page. I wonder if this is a WebLogic issue??
***POOLTIME.JSP***
<html>
<body>
<h1>Sign up for Pool Time</h1>
<br>
To sign up, first choose the time you'd like.<br>
5pm<br>
7pm<br>
9pm<br>
</body>
</html>
***SUBMITFORM.JSP***
<html>
<body>
<h1>Sign up for pool time</h1>
<br>
At this time:<%= request.getParameter("time") %>
<form method="get" action="result.jsp">
<input type="hidden" name="pooltime" value="<%= request.getParameter("time")
%>">
<input type="text" name="first">
<input type="text" name="last">
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>
***RESULT.JSP***
<html>
<body>
<h1>Here's what you signed up for:</h1>
<br>
time:<%= request.getParameter("pooltime") %><br>
your first name:<%= request.getParameter("first") %><br>
your last name:<%= request.getParameter("last") %><br>
</body>
</html>

Similar Messages

  • HOWTO: command_button, action and request parameters HOWTO

    Starting from carDetail.jsp example:
    Click of button:
    <h:command_button
    action="#{carstore.storeFrontLuxuryPressed}"
    value="#{bundle.moreButton}" >
    </h:command_button>
    Method Invoked:
    public String storeFrontLuxuryPressed() {
         setCurrentModelName("Luxury");
         return "carDetail";
    Navigation case "carDetail" maps to:
    <navigation-rule>
    <from-view-id>/storeFront.jsp</from-view-id>
    <navigation-case>
    <description>
    Any action that returns "carDetail" on storeFront.jsp should
    cause navigation to carDetail.jsp
    </description>
    <from-outcome>carDetail</from-outcome>
    <to-view-id>/carDetail.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    So I imagine that a forward is done to carDetail.jsp
    At this point I want to daviate from the sample. I would like to pass request parameters to carDetail.jsp
    like:
    carDetail.jsp?mode=create&date=25-Dec-2003
    I want my managed bean in carDetail.jsp to get populated from request scope. The managed bean in config looks something like this:
    <managed-bean>
    <description>this is for item test bean.</description>
    <managed-bean-name>PageParams </managed-bean-name>
    <managed-bean-class> com.a.PageParams</managed-bean-class>
    <managed-bean-scope> request </managed-bean-scope>
    <managed-property>
    <property-name>mode</property-name>
    <value>#{requestScope.mode}</value>
    </managed-property>
    <managed-property>
    <property-name>date</property-name>
    <value>#{requestScope.date}</value>
    </managed-property>
    </managed-bean>
    How should I code the following method to pass the request parameters to the next page:
    public String storeFrontLuxuryPressed() {
         setCurrentModelName("Luxury");
    //Can I do anything here to help navigation system to pass additional request parameters to
    //the carDetail.jsp page
         return "carDetail";
    Please help as I have many pages that have command_button and control leads to other pages that take request parameters to initialize and set themselves up. And I can't understand how to make the two concepts work together?
    Thanks,
    Vinay

    Thx hunangdp
    your solution of using <f:parameter> is perfect #in case# <h:command_button> is not nested inside <h:data_table> , otherwise the request parameter passed will always show the value of the 1st row , not the clicked row .
    consider the following :
    <h:data_table var="item" value="#{shoppingCartBean.shoppingItems}" >
    <h:column>
    <h:command_link value="#{item.productId}" action="product" id="productAction">
    <h:output_text value="#{item.productName}"/>
    <f:parameter name="productId" value="#{item.productId}"/>
    </h:command_link>
    </h:column>
    </h:data_table>
    in this case using the following at the back end :
    FacesContext fc = FacesContext.getCurrentInstance();
    java.util.Map requestParameter = fc.getExternalContext().getRequestParameterMap();
    String value = requestParameter.get("productId");
    will return the value of the 1st row ..
    so if, instead I consider adding an action listener which set the request attribute "productId" to the command_link value , this will work , but I have to get the value from request attribute not the request parameter ==> :
    <h:data_table var="item" value="#{shoppingCartBean.shoppingItems}"
    rowClasses="InnerTable">
    <h:column>
    <h:command_link value="#{item.productId}" action="product" id="productAction">
    <h:output_text value="#{item.productName}"/>
    <f:action_listener type="mybean.Listener"/-->
    </h:command_link>
    </h:column>
    </h:data_table>
    and mybean.listener ==> :
    String id = (String) ((UICommand) event.getComponent()).getValue();
    HttpServletRequest request = (HttpServletRequest)facesContext.getExternalContext().getRequest();
    request.setAttribute("productId", id);
    any comments.. ?

  • Newbie: what is the equivalent of passing request parameters?

    Hi-
    I am new to JSF. I have read many tutorials and articles. I still don't get one concept about passing parameters. Note: I don't want to store stuff in the session unless I have to.
    Let's say I have a page with a list of users. I layout the page with a panelGrid. Each row of the table has the first and last name of the user. If a user clicks on the name of a user on the user list, it should go to the user profile page. The backing bean for the user list page will be the UserListBean. It has a method called getUsers() that returns a List of User objects.
    For the View User page, I have a ViewUserBean. The ViewUserBean retrieve the entire profile for that user.
    How do I pass the user ID to the ViewUserBean? In struts, I would pass it as a request parameter (I would manually write the link URL with the userID). I know I can use the request like that in JSF, but that seems ugly. I looked at the code of the J2EE bookstore tutorial and it does a funky thing with all sorts of data stored in the session.
    What is the best way to request a page and "pass in" a userID?
    Thanks for your help.
    Adam

    I have a case on my current project very similar to your case. What you want, very simply, is an easy way to allow faces to handle URLs like http://www.domain.com/showUserDetails?userId=50
    The natural trouble is that when loading the page, there is no action to use to prefetch the User object based on the Request Parameters in JSF.
    All the solutions above either rely on the session or they are exceedingly complex. This case is actually very easy to do and is very straight forward using Managed Properties and a Request Scope bean...
    Here is the rather straight forward solution I used...
    First, make a "ShowUserDetailsBean" which represents the "logic" for this page.
    public class ShowUserDetailsBean
        /** Will point to the actual user service after dependency injection*/
        private UserService userService;
        /** Will hold the userId from the HTTP Request Parameters*/
        private String userId;
        /** Will hold a lazy loaded copy of the User object matching userId*/
        private User user;
        public void setUserService(UserService userService) {
            this.userService = userService;  //dependecy injection
        public void setUserId(String userId) {
           this.userId = userId;  //dependency injection
        /** Lazy loads the User object matching the UserId */
        public User getUser() {
            //Trap the case where the URL has no userId
            if (userId == null) return null;
            if (user == null) {
                user = userService.getUser(userId);  //Lazy Load
            return user;
    }Next, configure the managed properties in faces-config.xml
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
      <managed-bean>
        <managed-bean-name>userService</managed-bean-name>
        <managed-bean-class>foo.UserServiceImpl</managed-bean-class>
        <managed-bean-scope>application</managed-bean-scope>
      </managed-bean>
      <managed-bean>
        <managed-bean-name>showUserDetails</managed-bean-name>
        <managed-bean-class>foo.ShowUserDetailsBean</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
        <managed-property>
          <property-name>userService</property-name>
          <property-class>foo.UserService</property-class>
          <value>#{userService}</value>
        </managed-property>
        <managed-property>
          <property-name>userId</property-name>
          <property-class>java.lang.String</property-class>
          <value>#{param.userId}</value>
        </managed-property>
      </managed-bean>Finally, you just make your webpage as you normally would...
    <h:outputText value="#{showUserDetails.user.userId}"/>
    <h:outputText value="#{showUserDetails.user.firstName}"/>
    <h:outputText value="#{showUserDetails.user.lastName}"/>
    Now you're ready to test, so you visit the page
    http://www.domain.com/showUserDetails?userId=50
    And your user details with userId=50 appears!
    It's just that simple!
    Regards,
    Doug
    Caveat: I haven't added any sample logic to handle cases where you visit:
    http://www.domain.com/showUserDetails
    without specifying a userId. I suggest you add some basic logic to your page to handle this case more gracefully.

  • Passing Request Parameters to Non JSF Page

    I want to pass request parameters from a JSF page (Page1.jsp) to a non JSF page (paramTest.jsp) and am having trouble.
    The parameters are 'null' in the non JSF page.
    Here is code (in Page1.java) that is called when 'button1' is clicked in Page1.jsp (modified from JSF, Bergsten p.167):
    public String button1_action() {
            FacesContext context = javax.faces.context.FacesContext.getCurrentInstance();
            ExternalContext ec = context.getExternalContext();
            try {
                ec.redirect("http://xxx/paramTest.jsp");
            } catch (Exception e) {
                // print exception information in the server log
                log("Exception occurred when redirecting page", e);
                error("Trouble redirecting page");
                return null;
            context.responseComplete();
            return "success";
        }Here is Page1.jsp code: <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <jsp:text><![CDATA[
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    ]]></jsp:text>
        <f:view>
            <html lang="en-US" xml:lang="en-US">
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>Page1 Title</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                    <h:form binding="#{Page1.form1}" id="form1">
                        <h:inputText binding="#{Page1.name}" id="name" style="left: 144px; top: 96px; position: absolute"/>
                        <h:outputLabel binding="#{Page1.componentLabel1}" for="componentLabel1" id="componentLabel1" style="left: 72px; top: 96px; position: absolute">
                            <h:outputText binding="#{Page1.componentLabel1Text}" id="componentLabel1Text" value="Name:"/>
                        </h:outputLabel>
                        <h:commandButton action="#{Page1.button1_action}" binding="#{Page1.button1}" id="button1" onclick="this.form.submit() style="left: 120px; top: 144px; position: absolute" value="Submit"/>
                        <h:messages binding="#{Page1.messageList1}" errorClass="errorMessage" fatalClass="fatalMessage" id="messageList1" infoClass="infoMessage"
                            showDetail="true" style="left: 480px; top: 72px; position: absolute" warnClass="warnMessage"/>
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>Here is the rendered Page1.jsp html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xml:lang="en-US" lang="en-US">
    <head>
    <meta http-equiv="Cache-Control" content="no-cache"/><meta http-equiv="Pragma" content="no-cache"/>
    <title>Page1 Title</title>
    <link type="text/css" rel="stylesheet" href="resources/stylesheet.css"/>
    </head>
    <body style="-rave-layout: grid">
    <form id="form1" method="post" action="/cenwkd/faces/Page1.jsp;jsessionid=79A5577F53DAAEDF164C5D33F33D8327" enctype="application/x-www-form-urlencoded">
    <input id="form1:name" type="text" name="form1:name" style="left: 120px; top: 96px; position: absolute" />
    <label id="form1:componentLabel1" for="form1:componentLabel1" style="left: 72px; top: 96px; position: absolute">
    <span id="form1:componentLabel1Text">Name:</span></label>
    <input id="form1:button1" type="submit" name="form1:button1" value="Submit" onclick="" style="left: 120px; top: 144px; position: absolute" />
    <input type="hidden" name="form1" value="form1" />
    </form>
    </body>
    </html> Here is the source for a test jsp, paramTest.jsp: <html>
    <head>
    <title>
    paramTest
    </title>
    </head>
    <body>
    <h2><%= request.getParameter("form1:name")%></h2>
    <%-- Also tried: request.getParameter("name"), "name" is the original 'id' value for the text field entered in Creator
         it apparently is changed to "form1:name" when the html is rendered--%>
    </body>
    </html>Here is the rendered html from paramTest.jsp: <html>
    <head>
    <title>
    paramTest
    </title>
    </head>
    <body>
    <h2>null</h2>
    </body>
    </html>Any help would be much appreciated.

    Hi,
    I dont see any parameters that you are trying to pass in the below code.
    public String button1_action() {
    FacesContext context = javax.faces.context.FacesContext.getCurrentInstance();
    ExternalContext ec = context.getExternalContext();
    try {
    ec.redirect("http://xxx/paramTest.jsp");
    } catch (Exception e) {
    // print exception information in the server log
    log("Exception occurred when redirecting page", e);
    error("Trouble redirecting page");
    return null;
    context.responseComplete();
    return "success";
    }

  • WHY? Request Parameters From Form are NULL

    I have the following process, which by the way has been working successfully for months, until just recently.
    1) User comes to JSP page to upload images through a form that has the <input type="file"> fields as well as <input type="hidden"> to hold a few essential values.
    2) User submits form, form action attribute set to go to a Servlet
    3) Servlet reads all request params and inserts the images into a database.
    I have code to read in the images...I use classes from the org.apache.commons package.
    I could only assume it was the servlet that was the problem, but doubted that because why would it work all these months than suddenly stop.
    I set up a test html page with a form and had it go to a jsp page to read the request params and print them out. To my suprise they all had NULL values.
    Which tells me that the params aren't being read from the form.
    How could this be??
    Here is some example code snippets from my test pages:
    HTML PAGE
    <html><body>
    <form name="images" action="testing_operations.jsp" enctype="multipart/form-data" method="post">
    <input type="hidden" name="Customer_Number" value="4750">
    <table>
    <tr><td>
    <input type="file" name="image1" />
    </td></tr>
    <tr><td>
    <input type="file" name="image2" />
    </td></tr>
    <tr><td>
    <input type="submit" value="submit">
    </td></tr>
    </table>
    </form>
    </body>
    </html>JSP PAGE
    String cus = request.getParameter("Customer_Number");
    out.println("cus : " + cus +"<br>");
    String image = request.getParameter("image1");
    out.println("image: " + image); 
    I'm stumped...what am I doing wrong?
    I can't continue until I get this figured out, can anybody help me with this?
    Message was edited by:
    Love2Java

    I ran my original app with the enctype and without it:
    the tomcat dos-prompt that shows exceptions lists out this below...
    org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed.
    C:\jakarta-tomcat\temp\upload_00000009.tmp (The system cannot find the path specified)
    at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:429)
    at org.apache.jsp.testing_operations_jsp._jspService(testing_operations_jsp.java:113)The code on line 113 in testing_operations.jsp is:
    List items = upload.parseRequest(request);
    and what is this .tmp file its trying to find?? I'm passing it an image off my local disk, not a .tmp file, there isn't even a temp folder in my jakarta-tomcat main folder....
    It is failing on this line because it isn't reading the request parameters sent in, thus why too when I test for the values of the params they return null.
    True, when I take out the enctype my test page will show the values, but this doesn't help me. I need that enctype attribute in there to process the images sent in through the fields.
    So where does this leave me??
    I went to the apache site for the commons upload and they have a more current version than what I'm using which is version 1.0, they have 1.1.1
    I downloaded the new version but had no success in using it, the compiler couldn't find a class I attempted to use.
    I still don't understand how this could be working and then suddenly stop.

  • How To Pass the Request Scope To Another Class

    In my ListThread class, I first retrieve some of the text fields; i.e., request.getParameter( ... );
    Thereafter, I want to pass the request scope together with some parameters to another class; SiteUtil.java., for some further processing. This is what I do:
    public final class ListThread extends HttpServlet
          public doPost( HttpServeltRequest request, HttpServlerResponse response)
                      throws ServletException, IOException
          String offset = request.getParameter( "offset" );
          String size = request.getParameter( "size" );
          SiteUtil.prepareNavigate( request, offset, size,
               MessageInboxConfig.ROWS_IN_THREADS );
    }This is my SiteUtil.java:
    import javax.servlet.http.HttpServletRequest;
    public class SiteUtil
       public static void prepareNavigate  
         (HttpServletRequest request, int offset, int   
                         collectionSize, int totalRows)
          int startOffset = offset + 1;
          int lastOffset = offset + collectionSize;
          request.setAttribute("StartOffset", new Integer(startOffset));
          request.setAttribute("LastOffset", new Integer(lastOffset));
    }Can I pass the request scope and save attributes in the scope this way?

    You can pass the request to that method as a parameter, yes, and you can even modify the request there. The request is just an ordinary Java object, so ordinary Java rules apply. Your code looks fine to me too.
    However don't try to store the request for future use, since after the response is sent back to the client, the request object is never used again. A new one is created for the next request.

  • Setting request parameters ?

    Hi there
    I tried the following:
    request.setAttribute("myVar", "myValue");
    pageContext.forward("/main");
    When it loads the main page, my variables are not being set.
    I have tried the <jsp:forward> page directive and this works for a simple test example I've used, but not when I try it in my application main page ( which consists of 3 frames). The 3 frames are all JSP pages, so does the time they get loaded affect the request and <jsp:forward> attributes being sent ?
    Or can I not just set request parameters?
    I'm stumped !
    Aaron

    No, thats not the case. getParameter and getAttribute return from different internal collections.
    An HttpServletRequest object will have two different HashMap objects (at least, they're probably HashMaps).
    One stores the parameters that were passed by the client's request (That's why they're always Strings - the client passes text using the HTTP GET and POST protocols). getParameter returns Strings from here.
    The other HashMap maintains objects that you add on the server side to pass between your servlets. You may want to add any type of object, so that's why these aren't required to be Strings.
    Think of neville's example (which allows you to use getParameter on the next page) as creating a new request that works as if the client had appended the extra parameters to the query string. You can't add non-String Objects using that method.
    If you try your simple example again using getAttribute, you'll probably find that it works.

  • Initialize managed bean from request parameters

    Hi:
    I thought this topic would be on the FAQ, but I couldn't find it. I am looking for a mean to initialize my managed bean from the query string. There must be something like:
    <h:form initializeBean=""true"" requestParameter=""id_author"" beanProperty=""#{author.id_author}"" action=""#{author.getFromDB}"" >
    </form>
    The url would be something like http://localhost:8080/protoJSF/showAuthor.jsf?id_author=5334
    And the getFromDB method would be something like
      Public void getFromDB()
         Statement stmt = cn.createStatement( ?SELECT * from author where id_author=? + getId_author() );
         ResultSet rs = stmt.executeQuery();
      }The only way I've found to perform something like this is to present a blank author form with a ''load data'' button: after pressing the button the user can see author's data and edit the data if she wants to. This two-step data screening is annoying, to say the least.
    There must be a better way.
    I beg for a pointer on how can I achieve the initializing of a managed bean with dynamic data.
    Regards
    Alberto Gaona

    You just have to read carefully the very fun 289 pages
    specification :-)Or, if 289 pages of JavaServer Faces is too much, you can get almost all of the same information from the JavaServer Pages 2.0 specification, or even the JSP Standard Tag Libraries specification :-).
    More seriously, the standard set of "magic" variable names that JavaServer Faces recognizes is the same as that reognized by the EL implementations in JSP and JSTL. Specifically:
    * applicationScope - Map of servlet context attributes
    * cooke - Map of cookies in this request
    * facesContext - The FacesContext instance for this request
    * header - Map of HTTP headers (max one value per header name)
    * headerValues - Map of HTTP headers (String array of values per header name)
    * initParam - Map of context initialization parameters for this webapp
    * param - Map of request parameters (max one value per parameter name)
    * paramMap - Map of request parameters (String array of values per parameter name)
    * requestScope - Map of request attributes for this request
    * sessionScope - Map of session attributes for this request
    * view - The UIViewRoot component at the base of the component tree for this view
    If you use a simple name other than the ones on this list, JavaServer Faces will search through request attributes, session attributes, and servlet context (application) attributes. If not found, it will then try to use the managed bean facility to create and configure an appropriate bean, and give it back to you.
    For extra fun, you can even create your own VariableResolver that can define additional "magic" variable names known to your application, and delegate to the standard VariableResolver for anything else.
    Craig McClanahan

  • Extracting Request Parameters from a POST.

    A client is POSTING some request parameters as part of its POST request.
    My servlet is getting this as part of the getInputStream.
    The contents of the inputStream received is:
    username=someUserName&password=somePassword
    Now how do I extract this username and password which is in the Body
    of the POST?
    I am trying request.getParameter("username")
    but am not getting the value of the username.
    Can some please help me as to how to get the request parameters?
    Attached is my servlet
    public class DeviceLocation extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html";
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    doPost(request,response);
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    System.out.println("Servlet up and running...");
    InputStream requestInputStream = request.getInputStream();
    InputStreamReader isr = new InputStreamReader(requestInputStream);
    BufferedReader br = new BufferedReader(isr);
    String line = "";
    StringBuffer sb= new StringBuffer();
    while ((line = br.readLine()) != null)
    sb.append(line);
    br.close();
    System.out.println(sb.toString()); // display the input Stream
    // Display all the Request Parameters
    System.out.println("Request Method : " + request.getMethod());
    System.out.println("Host : " + request.getHeader("Host"));
    System.out.println("User Agent : " + request.getHeader("User-Agent"));
    } // End of servlet class.

    try doing it without reading in the requestInputStream first:
    public class DeviceLocation extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html";
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    doPost(request,response);
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    System.out.println("Servlet up and running...");
    // Display all the Request Parameters
    System.out.println("username Parameter : " + request.getParameter("username"));
    System.out.println("Request Method : " + request.getMethod());
    System.out.println("Host : " + request.getHeader("Host"));
    System.out.println("User Agent : " + request.getHeader("User-Agent"));
    } // End of servlet class.

  • Getting error while passing implicit request object from JSP to JavaBean

    Hi,
    I am getting error while passing implicit object ie( request object)
    from within JSP to JavaBean.
    Following is source for JSP, JavaBean and Error message I am getting.
    vaLookup.jsp Source
    <jsp:useBean id="db" class="advisorinsight.javabeans.DisplayPages"
    scope="request">
    <jsp:setProperty name="db" property="request" value="<%= request %>"
    />
    </jsp:useBean>
    <jsp:getProperty name="db" property="totalrecords" />
    JAVABEAN DisplayPages.java source
    package javabeans;
    import java.io.Serializable;
    import javax.servlet.http.HttpServletRequest;
    public final class DisplayPages implements Serializable {
    private String totalrecords;
    private HttpServletRequest request;
    public void setRequest(HttpServletRequest req){
    this.request = req;
    public java.lang.String getTotalrecords()
    this.totalrecords =
    this.request.getParameter("totalrecords");
    return this.totalrecords;
    public DisplayPages(){
    totalrecords = "";
    request = null;
    error after executing vaLookup.jsp
    [30/Nov/2001 11:56:04:5] info: EXTMGR-006: GXExtensionManager: Extension
    service JavaExtData successfully loaded
    [30/Nov/2001 11:56:04:5] info: EXTMGR-006: GXExtensionManager: Extension
    service LockManager successfully loaded
    [30/Nov/2001 11:56:04:5] info: EXTMGR-006: GXExtensionManager: Extension
    service RLOPManager successfully loaded
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:5] info: REQ-012: thread add
    [30/Nov/2001 11:56:04:7] info: ENGINE-ready: ready: 10819
    [30/Nov/2001 11:56:46:0] info: --------------------------------------
    [30/Nov/2001 11:56:46:0] info: JSPRunnerSticky: init
    [30/Nov/2001 11:56:46:0] info: --------------------------------------
    [30/Nov/2001 11:56:51:7] error: Exception: SERVLET-compile_failed:
    Failed in compiling template: /va/valookup.jsp, javac error:
    c:\iplanet\ias6\ias\APPS\variabl
    S\va\valookup.java:76: Undefined variable: JSP_8
    db.setRequest(_JSP__8);
    ^
    1 error
    Exception Stack Trace:
    java.lang.Exception: javac error:
    c:\iplanet\ias6\ias\APPS\variableannuity\va\WEB-INF\compiled_jsp\jsp\APPS\va\valookup.java:76:
    Undefined variable: JSP_8
    db.setRequest(_JSP__8);
    ^
    1 error
    at
    com.netscape.server.servlet.jsp.JSPCompiler.compileJSP(Unknown Source)
    at
    com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP(Unknown
    Source)
    at
    com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown
    Source)
    at
    com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown
    Source)
    at
    com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callJspCompiler(Unknown
    Source)
    at
    com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUri(Unknown
    Source)
    at
    com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUriRestrictOutput(Unknown
    Source)
    at
    com.netscape.server.servlet.platformhttp.PlatformRequestDispatcher.forward(Unknown
    Source)
    at com.netscape.server.servlet.jsp.JSPRunner.service(Unknown
    Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
    Source)
    at
    com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
    Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)

    The only thing that I see that looks funny to me is when you pass the request object into the method using <%=request%>, Im not sure whats going to happen here because that is suppose to print the results. Have you tried simply using <%request%>?

  • To pass the page parameters to a form in portal

    Hi,
    I am trying to develope a simple page using portal which contains
    1. Simple parameter form.
    2. Form that accepts the data from the simple parameter form.
    I want to pass 2 page parameters to this form(no.2)
    Is it possible to pass the page parameters to a form in portal?

    You can see a simple example of setting parameters here:
    http://www.patrickhaston.co.uk/Portal/parameters.html
    And to use them in a form:
    http://www.patrickhaston.co.uk/Portal/webplsqlapp1.html
    Hope this helps.
    Patrick

  • How to pass the report parameters through java not by using URL

    Hello...
    I have an oracle App. Server 10g with report service
    I can the report using the URL :
    http://host:Port/rwservlet/report=....
    and passing the report parameters ...
    But is there any way to call the report by pdf format and passing the parameters from java without using the url ???

    thank you shahcsanjay for your reply
    but I think that web.showDocument can not be used by ordinary java web application ..
    I think it can be used only with with "oracle forms" Am I right ?
    If no can you please tell me where can I find a useful document about how to use web.showDocument ...
    thanks again
    Saleem

  • Calling procedures multiple times passing rum time parameters

    hii,
    i ve this small prob with my procedure..my proc is
    CREATE or replace PROCEDURE sad(star_val number,dept_id number) IS
    BEGIN
    update dept set star=star_val where department_id=dept_id;
    END;
    and i call this proc using a loop and give the values at runtime..
    declare
    v_count number(3);
    begin
    v_count := 4;
    loop
    sad(&value,&dept);
    v_count := v_count-1;
    exit when v_count=0;
    end loop;
    end;
    this procedure runs only once with out looping 3 times..can anybody help me out..

    .... passing rum time parameters ......
    programming in the caribbeans must be wonderful
    anyway : how do you know it ran only once ?
    most probably it ran 5 times doing the same update defined by &value,&dept
    ahh, now I get it, you believe you'll be asked again and again to enter values for &value,&dept .
    Sorry, no can do, PLSQL is not interactive
    further reading at http://tahiti.oracle.com

  • Passing Runtime initialization parameters to a Servlet

    Hi all.
    Plz.let me know, how do you pass runtime initialization parameters to a Servlet. Also, when do we need this approach. Thank You.

    Global parameters that may change should be passed as parameters so that the servlet doesn't have to be recompiled to make the change.
    Here a global parameter is used to store a timeOut value. This value is written to every web page to force the page to refresh.
    <web-app>
        <servlet>
            <servlet-name>
                KioskServlet
            </servlet-name>
            <servlet-class>
                KioskServlet
            </servlet-class>
            <init-param>
                <!-- number of seconds of inactivity until timing out -->
                <!-- 300 = 5 minutes -->
                <param-name>timeoutValue</param-name>
                <param-value>300</param-value>
            </init-param>
         </servlet>
    </webapp>

  • How to pass selection screen parameters to a BEx IView?

    Hi Experts,
    I have added BI Reports in EP and I want to pass the default input parameters to the BI IView as soon as its accessed in EP.
    Can some one tell me how can I achieve this? Is there a way to pass the input parameters in the "Application Parameters" property of the BEx Iview?
    Regards,
    Shobhit

    don't you mean he other way around. Assign text-elements (selection texts) to select options?
    This you do in the menu where you can find text-elements, selection texts.
    menu Goto->text elements->selection texts.
    Edited by: Micky Oestreich on May 10, 2008 2:45 PM

Maybe you are looking for

  • StarWalk compass stopped working with their most recent update.

    My favorite application on my iPad used to be Starwalk. Ever since their most recent update on April 30, the internal compass stopped working (which is basically the backbone of the entire app). I contacted Vito technology (the developer) - it took a

  • Transfer of values from one recon to other recon account

    Guru's, I wanted to change the recon account of a vendor from 8050001 to 8050002. Few entries are already posted in the vendor with the recon 8050001. I know that FAGL101 can be used to transfer the values from 8050001 to 8050002. In the OBBW I did t

  • Line item does not exists for Good issue

    Dear All, User have created a outbound delivery and perform Post good issue.No billing document has been created yet. Somehow lineitem does not exists in the delivery document however Material Document for Good issue exists with reference to Delivery

  • Mac Mail Bluehost problem

    Macbook Pro OS X 10.9.5 (13F34) Processor  2.53 GHz Intel Core i5 Memory  8 GB 1067 MHz DDR3 My mail is hosted on Bluehost, I haven't changed any settings. We switched our website from Bluehost to Wix on Tuesday of this week, but the email is still h

  • How do i transfer photos

    how do i transfer photos from iPod touch to MacBook Pro when sync'ed?