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

Similar Messages

  • 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!

  • Is there any way to pass value from one SWF to another ?

    I am doing project using flash, now I cant pass a value from one SWF to another, is there any way to pass value from one SWF to another.
    thanks

    Hi,
    Just to confirm here do you simply want to communicate between two SWFs without involving Flash Media Server. If this is the case one good way of doing it is to use a local connection. It can be used for direct communication between two separate instances of the flash player. However if you want to involve multiple clients sharing a common variable then you may have to use Shared Object for this. Please let me know what is the actual use case, is it multiple clients sharing a common variable or different player instances communicating between themselves.
    Thanks,
    Abhishek

  • Pass Value from one tab to another

    Hi,
    I have a requirement to pass a value from one tab to another.
    For ex: I have a CC&B page with two tabs (Main, Steps).
    In the Main tab, I choose a Field Activity. Once it is chosen, I want to pass the value of the Field Activity ID to the 'Steps' tab. Once I get the value of the field Activity, I can then query up a table and populate some fields in the Steps tab. How can i achieve passing the value if FA Id from one tab to another?
    I tried to create an extension of the page using ext_page.jsp. But this extension just provides us methods like extPreOnWindowLoad(), extPostOnWindowLoad() etc which really is not helpful.
    Any suggestions?
    thanks

    Hi,
    We cannot pass multiple values using Drill Filters beause it is based on hierarchy that can take only one value at a time.
    If you want you can use Report Level Filter instead.
    Neither can we pass dril filters from one tab to other.

  • 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

  • Pass value from one page to another

    Hi All,
    "How to pass the value from one Flex page to anothere Flex
    page".
    In First Flex page contains One Inputtext and one button is
    there.After entering the data in inputtext box,the user clicks on
    the button then get the data from inputtext box and then i need to
    send that value to another flex page and display there.
    Can u tel me plz............
    Thanks & Regards,
    Nagarjuna.

    I believe you are thinking in terms of HTML and traditional
    page coding. As an old school ColdFusion guy I understand it is
    difficult to leave that behind. (at least it was for me.) Unless
    you literally have two different HTML pages that each have their
    own Flex app running in them you do not need to send data from one
    page to the next like you would with Web Forms. (If you are doing
    that you may want to simply write the data to a Shared Object, Pass
    it to a server to store and then feed back into the second Flex App
    when it loads or perhaps use the ExternalInterface to then pass it
    through as a series of URL parameters that can be loaded into the
    next Flex App.)
    In Flex you do not have to worry about loosing state between
    pages because there are literally no pages. Only different views.
    You would not "Send" the value from one page to another. You
    provide a mechanism for the second view to reference the same model
    or data object (most call them ValueObjects) that the first view is
    setting via the form fields.
    You would want to use a ValueObject in the first VIEW and
    then fill the object with the form data using setter methods on the
    object. For example set the fields onChange event to call the
    setter on the object and pass it the form fields value as the
    property. Alternately you could bind the values of the model
    directly to the fields so that they automatically obtain the data
    that is being filled in.
    Depending on how complex of an application you are going to
    build and how scalable it must eventually be you have many
    different options to choose from to allow the second View to use
    the data set but the first. However to make the application
    ultimately more scalable you are going to want to keep your view
    separated from the controller and that separated from the
    Model/ValueObject. (By seperated I mean in different classes.)
    I would suggest looking up the subject of MVC in Flex and
    also the Mediator Design pattern. There are many great sources of
    information.
    Here are a few links that may help with ideas.
    http://flexblog.faratasystems.com/?p=246
    http://pages.cpsc.ucalgary.ca/~heatond/mediator/
    http://livedocs.adobe.com/flex/3/html/help.html?content=introbd_2.html

  • Pass value from one layer to another.

    Hey,
    Is it possible to pass a value from one layer to another.
    I have a text that I'll get from layer 1 and I want to pass the value to a TextArea in layer 3.
    Is it possible, anyone?
    Thanks.

    I cannot be sure what you are calling a layer is what I know to be a layer--normally one does not go to layers, one goes to different frames.  If you look at the timeline, it consists of frames and possibly multiple layers.  Every layer has the same number of frames, and content in frame 1 of one layer is accessible by content in frame 1 of any other layer.  So if you have a textfield in layer 1, frame 1, and you have a textarea in frame 1, layer 2, you can use code to have the text in one of those assigned to the other.
    If you show a picture of what you are trying to describe it may help.

  • 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

  • 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?

  • Pass values from one Taskflow to another

    JDev 11.1.1.5.0 ADF BC
    Use case: Need to pass values between two bounded taskflows. There are two different pages on two different taskflows and I need to pass values from one to another.

    Hi sahar
    you can set the value you want to pass to another taskflow in pageFlowScope
    and create input params in the another taskflow and set this pageFlowScope valu into that
    Params of TaskFlow
    you can refer the following link
    http://opreview.blogspot.in/2011/07/adf-how-to-pass-parameters-between.html
    Regards

  • How to pass value from one method to another method

    Hi all,
    I have created a funtion module and i am calling this function module inside a method and it is exporting some value in a table, now i have to pass table value to another method where i have do some thing based upon this values.
    I think there a marco available to move the values from one method to another method.
    Please help me in this issue.
    Regards
    Balaji E.

    Hi,
    Let me make certain assumptions!
    Method 1 - You export the table values
    Method 2 - The method where you need the table values
    Once you create a method from a function module which has tables as one of the export parameters then the code automatically puts in the macro code which looks like : SWC_SET_TABLE CONTAINER 'Table' TABLE.
    The 'Table' in the above code is the container element which is created by the workflow once you use this method and the TABLE (The table that gets filled in the function module) is the variable to code automatically created.
    Now you can use the other function module in the workflow as a background step and pass the values from the 'Table' container to this method using the binding. When you use this then the method automatically has the macro SWC_GET_TABLE CONTAINER 'Table' ITABLE. Here the 'Table' is the same container table you used in the binding and the ITABLE would be the variable you can use in the other function module.
    Hope this helps,
    Sudhi

  • Pass value from one VO to another VO.

    I want to create an item on the page but the value is in a different VO in the same root AM. How would I do this other than extending VO(1).
    Both the VO's are on the same page.
    Can you please let me know.
    Thanks
    Rama
    Edited by: user4280075 on Apr 3, 2012 1:41 PM

    Hi,
    Not sure what is your requirement. But if it is just you want to create a new ITEM on a page and the VO's are already present then what is the issue. You can set the vo attribute of any of the VO's available.
    But if your requirement is to copy a value from one VO to another then you can iterate the VO and get the required value and set it to the desired VO row.
    Thanks,
    Mukesh Uchaniya

  • Pass value from one form to another (Dev 6i)

    How to pass a value/variable from one form to another called form in Oracle Dev 6i

    1. One-way communication (calling form sends information to called form)
    - using Forms :PARAMETER variables:
    OPEN_FORM / CALL_FORM (form_name, ..., parameter_list);
    2. Two-way communication
    2.1. If Forms modules runs in different database sessions
    (using "OPEN_FORMS (..., SESSION, ...);" called form runs in a new database session),
    you can use:
    - Forms global variables (:GLOBAL)
    - global record groups, created using GLOBAL_SCOPE parameter:
    rec_grp_id := CREATE_GROUP_FROM_QUERY (..., GLOBAL_SCOPE);
    - database "global" Application Context (available from Oracle 9i)
    2.2. If Forms modules runs in the same database session you can use methods in 2.1 plus:
    - library package data; with SHARE_LIBRARY_DATA parameter,
    Forms that have identical libraries attached can share library package data:
    OPEN_FORM / CALL_FORM (form_name, ..., SHARE_LIBRARY_DATA, parameter_list);
    - database package data (but, you must use get/set methods)
    - database "private" Application Context (available from Oracle 8i)
    Regards,
    Zlatko Sirotic

  • Passing Value from one File to Another !!!

    Hi Friends,
    I have an issue, I have two different Swing programs (two seperate java files). I want to transfer value from one file to the another. Like we do in Servlets or JSP, we use sessions or Hiddenfields. The same way I want to retriev value in a new file from a previous one.
    Hope that all u champs out there have the answer to my query.
    Thanks,
    [email protected]

    This is a B2B comms question...
    A quick and dirty method is to use Socket/ServerSocket and use a basic protocol to do the transfer, if you are feeling heroic then use XML as the message format...
    A lot depends on whether your applications are running on separate boxes, i.e. do you need to communicate across a network...
    If not, if they are always going to be on the same "box" then you could just use well-known places for files...not portable but effective...

  • ESB  : How to Pass value from one RS to another RS

    Hi Gurus,
    I want to pass a value from one First Routing service to another to set the value for the last XSL transformation.
    How can I do this without creating specific XSDs??
    Rgs
    JO

    Data flowing through the ESB is XML-based (or opaque), so if the value you want to pass is in the XML result of RS1, you can use it in RS2. If you have a good reason why not too or this doesn't work for you, you could store data somewhere along the ESB process (database, stateful bean, etc.). Otherwise, you would need to let the ESB generate (or create you own) XSD describing the XML.
    Regards,
    Ronald

Maybe you are looking for

  • Can't invert an image

    Hello,           I've been working on Java Advanced Imaging for a while to create FAX TIFF, but failed to invert the image's color (which was negative white-on-black) to positive.           BufferedImage form_img;           RenderedOp rop;           

  • Compressor 3.5 Watermark Rendering Bad

    Hi All, Just upgraded to Final Cut Studio 3 (Compressor 3.5) and when I render Watermarks that looked fine in Compressor 3, they are now almost totally 'washed out' or faded. Specifically, the watermarks were made in Photoshop (PSD) and the Opacity w

  • My macbook froze up when I put in Mountain Lion disk

    My sister just put in the Mountain Lion disk to upgrade her MacBook.  It froze up so she shut down and when she turned it back on she's stuck at the Apple start screen and it won't go anywhere.  Any ideas.....?????

  • Function Based Indexes - negative performance

    Has anyone run across any cases where they have had issues with Function Based Indexes negatively impacting performance?? We are trying to use function based indexes in 9i (NLS_SORT=GENERIC_BASELETTER) and 10g (NLS_SORT=BINARY_CI) for case insensitiv

  • Gradient edge

    Sorry for what's probably a basic question: I have a grayscale image that's a pretty consistent 85-90% black towards the edges. I want to print it on a full page in a book, but I can't use a bleed, so I want to fade the edges to white. I can only alt