Passing information from one jsp to another

Hi,
I have a problem when trying to get information from a jsp page. Lets say that a jsp page has a textbox named "bannerurl" and it has the data "http://www.abcd.com?param1=2000?param2=3000". When I try to get the information in an other jsp file using request.getParameter("bannerurl"), I get only the following data - ""http://www.abcd.com?param1=2000". All information including and after the "&" is ignore. This could be because it is recognizing the information after the "&" as an other parameter. How do I solve this problem.
Thanks.

Hi
Are the two jsps below roughly doing what you want your application to do?
regards
Stephen
//jsps
1st page
<%@page contentType="text/html"%>
<html>
<head><title>JSP Page</title></head>
<body>
          <form method="post" action="temp2.jsp">
          <table>
          <tr>
               <td><span id="urlLabel">Enter url</span></td>
               <td><input type="text" size="50" maxlength="50" name="urlField" /></td>
               </tr>
          </table>
<div>
<input type="submit" value="Submit" name="urlTestField" />
</div>
<form>
</body>
</html>
2nd page
<%@page contentType="text/html"%>
<html>
<head><title>JSP Page</title></head>
<body>
<% out.write((String)request.getParameter("urlField"));%>
</body>
</html>

Similar Messages

  • How to pass information from one JSP to another JSP? help please

    hi there
    my question is how to pass some information such from one JSP to another one. for exmple, on one page there is a form, and i need to pass some values from the form to another jsp, or some values that were calculated on one JSP and need to be passed to another one. thanks

    You can do this in several ways...here is a simple one...
    When you call the second page url, use this
    http://www.mysite.com?myVariableFromPageOne="hello"
    on the second page use this:
    String firstPageVariable = request.getParameter("myVariableFromPageOne");
    Thanks

  • HT201250 how can i pass information from one mac to another mac by using the time capsule

    how can i pass information from one mac to another mac by using the time capsule

    If you want to transfer files, settings, etc., you must open Migration Assistant (Applications > Utilities) in the Mac that you want to transfer the files and follow the instructions

  • Passing value from one jsp to another?

    how to pass value from one jsp to another? i have a value assigned in the link, i want to pass that value to another jsp page?
    please help with code?

    Instead of the value being passed, i am getting a null value.
    Here is my calendar code:
    <%@page import="java.util.*,java.text.*" %>
    <html>
    <head>
    <title>Print a month page.</title>
    </head>
    <body bgcolor="white">
    <%
                  boolean yyok = false;
                  int yy = 0, mm = 0;
                  String yyString = request.getParameter("year");
                  if (yyString != null && yyString.length() > 0)
                      try
                          yy = Integer.parseInt(yyString);
                                  yyok = true;
                       catch (NumberFormatException e)
                          out.println("Year " + yyString + " invalid" );
                  Calendar c = Calendar.getInstance( );
                  if (!yyok)yy = c.get(Calendar.YEAR);  
                         mm = c.get(Calendar.MONTH);
    %>
                  <table align="center">
                      <tr>
                  <td>
                       <form method=post action="calendar.jsp">
                          Enter Year : <select name="year">
    <%         
                 for(int i= yy;i<=2010;i++)
    %>
                  <OPTION VALUE= <%=i%> > <%=i%> </option>
    <%       
    %>
              </select>
                      <input type=submit value="Display">
                      </form>
                      </td>
                    </tr>
    <tr>
                     <table>
    <%!
    String[] months = {"January","February","March",
                    "April","May","June",
                    "July","August","September",
                    "October","November", "December"
    int dom[] =     {
                        31, 28, 31, 30,
                        31, 30, 31, 31,
                        30, 31, 30, 31
    %>
    <%
                int leadGap =0;
    %>
    <div id="t1" class="tip"><table border="4" cellpadding=3 cellspacing="3" width="250" align="center" bgcolor="lavender">
    <tr>
    <td halign="centre" colgroup span="7" style="color:#FF0000;">
    </colgroup>
    <tr>
    <td>
    <%
              GregorianCalendar calendar =null;
              for(int j=0;j<12;j++)
                        calendar = new GregorianCalendar(yy, j, 1);
                  int row = 1 ;
                  row = row + j;
        %>
              <table>
                <tr>
              <colgroup span="7" style="color:#FF0000;">
              </colgroup>
                </tr>
              <tr align="center">
              <th colspan=7>
                  <%= months[j] %>
                  <%= yy %>
              </th>
              </tr>
    <tr>
    <td>Sun</td><td>Mon</td><td>Tue</td><td>Wed</td><td>Thu</td><td>Fri</td><td>Sat</td>
    </tr>
    <%
        leadGap = calendar.get(Calendar.DAY_OF_WEEK)-1;
        int daysInMonth = dom[j];
        if ( calendar.isLeapYear( calendar.get(Calendar.YEAR) ) && j == 1)
        ++daysInMonth;
        out.print("<tr>");
        out.print(" ");
          for (int h = 0; h < leadGap; h++)
           out.print("<td>");
          out.print("</td>");
        for (int h = 1; h <= daysInMonth; h++)
          out.print("<td>");
          out.print("<a href=desc.jsp>" + h + "</a>" );
          out.print("</td>");
        if ((leadGap + h) % 7 == 0)
            out.println("</tr>");
    out.println("</tr></table></div>");
    if( row%3 != 0)
    out.println("</td><td>");
    else
    out.println("</td></tr>\n<tr><td>");
    %>
    </html>I need to pass the value in 'h' to the desc.jsp page.
    my code for desc.jsp is :
    <html>
    <head>
    </head>
    <body bgcolor="lightblue">
    <form method=post action="Calenda.jsp">
    <br>
    <%= request.getParameter("h") %>
    <h2> Description of the event <INPUT NAME="description" TYPE=TEXT SIZE=20> </h2>
    <BR> <INPUT TYPE=SUBMIT VALUE="submit">
    </form>
    </body>
    </html>But i am not able to pass the value. The 'h' value contains all the date. i want to pass only a single date, the user clicks to the other page. please help

  • Passing variables from one jsp to another

    Hi All,
    I've searched thru the forum and can't find an answer to a prob I'm having, trying to pass a variable from one jsp to another.
    in file searchBar.jsp i have
    <%
    String archiveSearch = "off";
    %>
    and
    <%
    if (userUtils != null && userUtils.getSearch().equals("on"))
    %>
    <a href="/webLayout/webSideBar.jsp?searchState=<%=archiveSearch%>onclick="archiveSearch = "on""></a>
    and in file webSideBar.jsp
    <%
    String searchState = "off";
    String archiveSearch = (String)request.getParameter("searchState");
    %>
    basically it will give me a variable archiveSearch set to on in webSideBar when the user clicks on the search button, but as it is it's not passing the variable from the searchBar.jsp to the webSideBar.jsp and I think it looks ok !!!! but it's not
    Help

    Looks good to me as well.
    Couple of suggestions
    1 - view source on searchbar.jsp - see what the generated source code for that link is
    2 - Look at the url used to generate webSideBar.jsp. If its not in the address bar, right click the webSideBar page and choose properties.
    Check to see what parameter was passed.
    Are these pages in a frameset? Do you have to specify a target frame for your link?

  • Passing Information from one RS to another RS

    How can we pass the information from one RS to another RS?

    yes,from EM when I am testing the webservice it is returning the string properly .
    In my ESB application I am calling this service thru a SOAP Service and I am using a FileAdapter to capture the result.Now to configure the RS shall i choose 'Generate WSDL from schemas' i.e. the request -reply option or 'Select Existing WSDL option'?I am choosing the first one.Now whn I am defining the rule there is a node mismatch in my source and target during mapping.When I am invoking the RS from EM i am getting some exception that "input is null".

  • Passing variable from one JSP to another

    Hi....
    I am working on customizing Oracle Application(istore).
    I need to pass variable from 1 JSP to another.
    JSP 1 contains the following line of code:
    <INPUT type="HIDDEN" name="soldtoCustPartyName" value="<%=soldtoCustPartyName%>">
    How can I pass this to another JSP Page. The other JSP should take the 'soldtoCustPartyName' and find out the primary address country.
    So please help me in getting variable passed from 1st JSP to next.
    By default, 1st JSP is not fwded to 2nd JSP.
    This is very very urgent...Please help.....

    When you push the submit button on jsp1 - it goes to jsp2?
    ie
    // in jsp1.jsp
    <form action="jsp2.jsp">
    <INPUT type="HIDDEN" name="soldtoCustPartyName" value="<%=soldtoCustPartyName%>">
    <input type="submit">
    </form>
    //Then in jsp2.jsp all you need is
    request.getParameter("soldtoCustPartyName");This will pick up the value that is coming from the hidden field on jsp1

  • How can I pass information from one portlet to another?

    First, some background...
    I am using Portal 5.0.2 and developing portlets using JSP/Java on a remote server.
    I need to pass information from a portlet on pageA to another portlet on pageB, but I can't do it using the traditional methods, such as query string, session, cookies, etc. due to either portal framework limitations or because of functional constraints (basically, a user will not necessarily be logged in to the portal, but he can view anything available to the GUEST user). Here are the different ways I've considered using to save state and their limitations:
    Query string: can't use this because portlets on remote servers don't have access to it
    Cookies: if user disables cookies, code will not function properly
    Session variables: limited to one user's connection with one portlet (i.e., can't access a session variable set in portletA from portletB)
    Application variables: because the user may not be logged in, I have no way of uniquely naming variables, which is a necessity in order to maintain state for EACH user
    User Settings: again, the user may not be logged in, so I can't use these
    PCC: can't access client-side variables because server-side JSP executes first
    Are my assumptions above correct? Has anyone had any success using one of these methods given the same constraints, or does anyone have an alternative solution? I'd certainly appreciate any help anyone could provide.
    Thanks,
    Jose

    One possibility would be to use a Login PEI to set a unique UserInfo Name/Value for the user. I think in 5.0 each guest session is unique, so would have unique UserInfo. Then you could pass this value to your portlet (by specifying it in the web service) and use it as a key into a Application-scoped hashmap where you store your info. In other words, your Application variables option, but you have a way of uniquely naming your variables via PEI-set UserInfo.

  • Passing information from one jsp to an included jsp

    I have one jsp page that includes many other jsp pages (using the include page directive) [there are many good reasons to have these pages separate, else I would love to just make them one at this point]
    I need to get information in jsp page 1 from the request. This information may or may not be there, may or may not be encrypted. If the information is not there, I am prepared to make an assumption. This said, my challenge lies in trying to do this once and make the information available to the included pages.
    I am using version 1.0 of JSP and the include page, param solution does not work for me.
    This is URGENT! Thank you in advance for any assistance.
    michelle

    Hi Michelle,
    1. I'm using Jsp 1.1. I'm not how Jsp1.0 behaves.
    Just try 2 or 3 depending on your need in waiting
    for more input.
    2. We can't pass data using include directive as:
    <%@ include file="to.jsp"%>
    3. We can pass data using include action as:
    <jsp:include page="to.jsp" flush="true">
         <jsp:param name="fname" value="FirstName"/>
         <jsp:param name="lname" value="LastName"/>
         <jsp:param name="age" value="11"/>     
    </jsp:include>
    -- Paul.

  • Pass arraylist from one JSP to another

    Hi all,
    I have a jsp in which i have a table with a list a of users. When we select some users and click on the deactivate link all these user information must be passed to another jsp which is a confirmation page to delete the users.
    In my first userlist jsp i have the code
    <h:commandLink styleClass="bold" value="Deactivate User" action="delete" actionListener="#{userlistcontroller.deleteaction}" ></h:commandLink>faces-config.xml
        <navigation-rule>
        <from-view-id>/userlist.jsp</from-view-id>
        <navigation-case>
          <from-outcome>delete</from-outcome>
          <to-view-id>/deactivateusers.jsp</to-view-id>
        </navigation-case>
      </navigation-rule>In my backing bean action method i populate the list of users that need to be deacivated in an array list
       String userAction;
       List<Integer> selectedUserIDList;
       public void deleteaction(ActionEvent event){
           userAction = "delete";
           selectedUserIDList = new ArrayList<Integer>();
           for (CompanyAdminUser user : userList) {
                 try {
                    boolean val = selectedIds.get(user.getID()).booleanValue();
               if(val){
                    selectedUserIDList.add(user.getID());
                 } catch (Exception e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
      }can someone help me how to pass this selectedUserIDList (arraylist ) and the userAction="Delete" to deacviate users jsp.
    Thank you
    Edited by: twisai on Mar 10, 2010 9:02 AM

    You can easily pass the 2 variables you mentioned using <f:param> inside your <h:commandLink>.
    <h:commandLink styleClass="bold" value="Deactivate User" action="delete" actionListener="#{userlistcontroller.deleteaction}" >
    <f:param name="userAction" value="delete" />
    <f:param name="userIDList" value="#{userlistcontroller.selectedUserIDList}" />
    </h:commandLink>

  • How to use session to passing data from one JSP to another JSP

    Dear All, I had create 2 jsp web page and want to do this:
    1. input some data into the text box and click the submit button, the jsp page
    will open another jsp page and send the text box data to the new open jsp page.
    can any one tell me how to open a new jsp web page and reciev data from another jsp page?
    thanks yu very much!
    the question.jsp got some code like:
    <html>
    <input type= 'text' name = 'txtName' size = 10 >
    <input type= 'submit' name = 'submit'>
    <% some jsp code %>
    </html>
    answer.jsp
    <html>
    <%
    some jsp code here
    %>
    </html>

    Contents of HTML forms are transmitted as name-value pairs, so you can call request.getParameter(String name) with your form field's name in order to access its value:
    String textValue=request.getParameter("txtName");Regards

  • List Box-passing value from one jsp to another

    I have a list box in a .jsp.
    <SELECT name="name">
    <option value ="Fred">Fred
    <option value ="Michael">Michael
    </select>
    <input type="submit"
         value="Names">
    I need to send the name to another .jsp. I don't know how to receive it or send it. I am using form method="post". I need to use the name selected in a query in my next .jsp, so I can select all the data in that has that name in it. I am connecting to a database on the iseries. Do I have to use submit or can I use something else? I wanted to use a link like this.
    <dt valign="left"><img src="bullet1.gif">
    Volunteer</dt>
    of course that didn't work.
    Thanks

    I got it! Never mind!

  • How can I transfer information from one ipad to another?

    how can I transfer information from one ipad to another ?

    What kind of information? You can sync things like Contacts and Calendars by using iCloud. You can backup one iPad to iTunes on a computer and then sync the backup to the other iPad. You can configure your iTunes content and sync the same content to both iPads.
    It is based on what you want to do. Or are you looking for a way to send files from one iPad to another wirelessly? There are apps to do things like that, as well as cloud services, such as DropBox.

  • OBIEE 11g How to pass variable from one prompt to another prompt in dashboard page.

      How to pass variable from one prompt to another prompt in dashboard page.
    I have two prompt in dashboard page as below.
    Reporttype
    prompt: values(Accounting, Operational) Note: values stored as
    presentation variable and they are not coming from table.
    Date prompt values (Account_date, Operation_date)
    Note:values are coming from dim_date table.  
    Now the task is When user select First
    Prompt value  “Accounting” Then in the
    second prompt should display only Accounting_dates , if user select “operational”
    and it should display only operation_dates in second prompt.
    In order to solve this issue I made the
    first prompt “Reporttype” values(Accounting, Operational) as presentation
    values (custom specific values) and default presentation value is accounting.
    In second prompt Date are coming from
    dim_date table and I selected Sql results as shown below.
    SELECT case when '@{Reporttype}'='Accounting'
    then "Dates (Receipts)"."Acct Year"
    else "Dates (Receipts)"."Ops
    Year"  End  FROM "Receipts"
    Issue: Presentation variable value is not
    changing in sql when user select “operation” and second prompt always shows
    acct year in second prompt.
    For testing pupose I kept this presentation
    variable in text object of dashboard and values are changing there, but not in
    second prompt sql.
    Please suggest the solution.

    You will want to use the MoveClipLoader class (using its loadClip() and addListener() methods) rather than loadMovie so that you can wait for the file to load before you try to access anything in it.  You can create an empty movieclip to load the swf into, and in that way the loaded file can be targeted using the empty movieclip instance name.

  • What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?

    Hi All,
    I am new to TestStand. Still in the process of learning it.
    What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?
    Thanks in advance,
    LaVIEWan
    Solved!
    Go to Solution.

    Hi,
    Using the Parameters is the correct method to pass data into and out of a sub sequence. You assign your data to be passed into or out of a Sequence when you are in the Edit Sequence Call dialog and in the Sequence Parameter list.
    Regards
    Ray Farmer

Maybe you are looking for

  • Invoking a web service via proxy

    Hi, I have requirement to invoke a web service protected by basic http authentication. I have generated a jax-ws proxy, the proxy makes a local copy of the wsdl. And I use the following code to invoke it: lDAPUserAdminService = new LDAPUserAdminServi

  • Step by Step how to Use Java Beans in Form 6i

    Dear All, Can anybody tell me step by step how to use Javabeans in form 6i. What i want is to know which form is getting executed and by whom with ip address on application server. When is execute the form made using javabeans Best Regards, Devendra

  • Re: Problem installing Adobe Reader

    Thanks for your help!

  • Updating an already published book on iTunes Producer

    How do I go about updating my already published paid iBook without using iBooks Author? The reason is that I created my epub in InDesign and so I cannot open the epub in iBooks Author for me to update it using the iBooks Author to iTunes Producer met

  • Service book For uzbekistan

    well, In Uzbekistan there is no BIS of BES, so thats why, we do not have any service books for our providers, could you help me, because I need service books(mms, internet) i will give the link Profile: Beeline MMS login: beeline passowrd: beeline AP