How to pass value from the jsp file to a java bean

I have huge promblem .I want to pass value of combo box to bean file to set my database contecting.The is how i call function to pass database to the bean file
<%db.setDatabase(database);%>are coding to set my databse connection
private String database;
    public Conn(){
     try{
               Class.forName("org.gjt.mm.mysql.Driver");
               DriverManager.registerDriver((Driver) Class.forName("org.gjt.mm.mysql.Driver").newInstance());
               String data=getDatabase();
               String url = "jdbc:mysql://localhost/"+data;
               Connection conn = DriverManager.getConnection(url);
               setConnection(conn);
          catch(SQLException e){
               System.out.println(e.toString());
          catch(Exception e){
               System.out.println(e.toString());
     public void setDatabase(String Database){
      this.database = Database;
     public String getDatabase(){
     return this.database;
     }     and Below are error produce
Note: sun.tools.javac.Main has been deprecated.
/mrs/system_menu.jsp:18: Method setDatabase(java.lang.String) not found
in class bgoc.dbConn.Conn.
db.setDatabase(database);
^
1 error, 1 warning
please help me soon. any that come to your will help
thank you

I have huge promblem .I want to pass value of combo box to bean file to set my database contecting.The is how i call function to pass database to the bean file
<%db.setDatabase(database);%>are coding to set my databse connection
private String database;
    public Conn(){
     try{
               Class.forName("org.gjt.mm.mysql.Driver");
               DriverManager.registerDriver((Driver) Class.forName("org.gjt.mm.mysql.Driver").newInstance());
               String data=getDatabase();
               String url = "jdbc:mysql://localhost/"+data;
               Connection conn = DriverManager.getConnection(url);
               setConnection(conn);
          catch(SQLException e){
               System.out.println(e.toString());
          catch(Exception e){
               System.out.println(e.toString());
     public void setDatabase(String Database){
      this.database = Database;
     public String getDatabase(){
     return this.database;
     }     and Below are error produce
Note: sun.tools.javac.Main has been deprecated.
/mrs/system_menu.jsp:18: Method setDatabase(java.lang.String) not found
in class bgoc.dbConn.Conn.
db.setDatabase(database);
^
1 error, 1 warning
please help me soon. any that come to your will help
thank you

Similar Messages

  • How to pass value from the Z Report to the selection screen of the std rep

    Dear Experts,
    i have developed a report and the values are maintained only in internal table based on some condition.  When I execute the report, for example MM60, there is a material number field for multiple selection.
    the report should call the standard transaction and pass the values from the internal table to the multiple selection- material number of the standard transaction.
    the standard transaction should never get executed automatically.  Only the value should get passed from internal table to the standard t code.  Please help.
    regards,
    Shankar

    Hai
    Go through the following Documents
    SUBMIT rep.
    Additions
    1. ... LINE-SIZE col
    2. ... LINE-COUNT lin
    3. ... TO SAP-SPOOL
    4. ... VIA SELECTION-SCREEN
    5. ... AND RETURN
    6. ... EXPORTING LIST TO MEMORY
    7. ... USER user VIA JOB job NUMBER n
    8. ... Various additions for parameter transfer to rep
    9. ... USING SELECTION-SETS OF PROGRAM prog
    Effect
    Calls the report rep . Leaves the active program and starts the new report rep .
    Addition 1
    ... LINE-SIZE col
    Effect
    Prints the report with the line width col .
    Addition 2
    ... LINE-COUNT lin
    Effect
    Prints the report with lin lines (per page).
    Addition 4
    ... VIA SELECTION-SCREEN
    Effect
    Displays the selection screen for the user. In this case, the selection screen is redisplayed after return from the report list display - the user's entries are retained.
    Addition 5
    ... AND RETURN
    Effect
    Returns to the calling transaction or program after the called program has been executed. SUBMIT ... AND RETURN creates a new internal mode .
    Addition 6
    ... EXPORTING LIST TO MEMORY
    Effect
    Does not display the output list of the called report, but saves it in SAP memory and leaves the called report immediately. Since the calling program can read the list from memory and process it further, you need to use the addition ... AND RETURN . Also, since the called report cannot be requested for printing, the addition ... TO SAP-SPOOL is not allowed here. You can read the saved list from SAP memory with the function module 'LIST_FROM_MEMORY' and then (for example) store it in the database with EXPORT . You can process this list further with the function modules 'WRITE_LIST' , 'DISPLAY_LIST' ... of the function group "SLST" .
    Addition 7
    ... USER user VIA JOB job NUMBER n
    Effect
    Schedules the specified report in the job specified by the job name job and the job number n . The job runs under the user name user and you can omit the addition USER user . The assignment of the job number occurs via the function module JOB_OPEN (see also the documentation for the function modules JOB_CLOSE and JOB_SUBMIT . This addition can only be used with the addition ...AND RETURN .
    Note
    When scheduling a report with the SUBMIT ... VIA JOB job NUMBER n statement, you should always use the addition ...TO SAP-SPOOL to pass print and/or archive parameters. Otherwise, default values are used to generate the list and this disturbs operations in a production environment.
    Addition 9
    ... USING SELECTION-SETS OF PROGRAM prog
    Effect
    Uses variants of the program prog when executing the program rep .
    Note
    Important
    The programs prog and rep must have the same SELECT-OPTIONS and PARAMETER s. Otherwise, variants of the program prog may be destroyed.
    Note
    When using this addition, the specified variant vari of the program prog is taken in USING SELECTION-SET vari . On the other hand, all variant-related actions on the selection screen of rep (Get , Save as variant , Display , Delete ) refer to the variants of prog .
    Example
    SUBMIT REPORT01
    VIA SELECTION-SCREEN
    USING SELECTION-SET 'VARIANT1'
    USING SELECTION-SETS OF PROGRAM 'REPORT00'
    AND RETURN.
    Effect
    Executes the program REPORT01 with the variant VARIANT1 of the program REPORT00 .
    Note
    Runtime errors
    LOAD_PROGRAM_NOT_FOUND : The specified program was not found.
    SUBMIT_WRONG_TYPE : The specified program is not a report.
    SUBMIT_IMPORT_ONLY_PARAMETER : Only one value passed to a report parameter.
    SUBMIT_WRONG_SIGN : Invalid value passed to a selection with the addition SIGN .
    SUBMIT_IN_ITAB_ILL_STRUCTURE : Table passed to a selection with WITH sel IN itab had an unexpected structure.
    Try with this Example
    Data: listobject like abaplist occurs 1 with header line.
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = listobject
    EXCEPTIONS
    OTHERS = 1 .
    IF sy-subrc <> 0.
    message ID '61' TYPE 'E' NUMBER '731'
    with 'LIST_FROM_MEMORY'.
    ENDIF.
    Thanks & regards
    Sreenivasulu P

  • How to pass values from single Databank file across different scripts?

    Hi Guys,
    I have a question regarding using single databank file across different scripts.
    Lets say there 5 web service scripts and these are very generic scripts where the input/request xml schema of each script is parameterized without having any databank as script asset.
    These 5 web service scripts are like library functions and so we dont want to attach any databank as script asset.
    However I have a driver script to call all of these 5 library scripts and now I attach a databank (a .csv file) to the driver script as script asset. Say this .csv file has got 10 different columns with just single record/row.
    As and when the function call goes to those 5 scripts i.e one by one, then based on the function call the corresponding columns are used and the data for those columns must be read.
    Is there any solution to acheive this?
    Faster help is highly appreciated.

    Hi JB,
    what i was looking for, was an approach to use a databank file (.csv file) in a parent script and then by reading that .csv file, the data should be moved from the parent script to individual child scripts.
    The child scripts are very generic scripts and are like library functions which are not data dependent. they are fully parameterized and they dont have any sort of databank attached to them.
    Now the question is if the databank has got 10 columns where first 3 columns belong to one child script, second 3 columns belong to 2nd child script and so on.
    Then how do we pass the values from parent script to a child script and what is the best/recommended approach.

  • 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

  • How to pass value from jsp to java bean

    I have huge problem . How to pass value from jsp value to java bean.Please replay me soon

    Use the <jsp:setProperty> tag. There are several ways to use it. The one you probably want is:
    <jsp:setProperty name="bean_name"  property="property_name"  value="the_value_you_want_to_set"/>

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • Need to take a value from the csv file and query in a OAF page.

    Hello,
    I have a requirement to take the list of employee numbers in a csv file and display its corresponding job on the page.
    I have created a item 'MessageFileupload' where the user will upload the csv file containing the employee number and a Button 'Display Jobs' which will display the corresponding jobs on the page.
    Any idea how to take the values from the csv file and query it?
    Regards,
    den123.

    Hi ,
    Check
    http://oraclearea51.com/contribute/post-a-blog-article/csv-file-upload-for-oa-framework.html
    http://www.roseindia.net/jsp/upload-insert-csv.shtml
    Below code works from above blogs.
    package xx.oracle.apps.pa.Lab.webui;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    // import java.io.*;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.server.OAViewObjectImpl;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.jbo.domain.BlobDomain;
    import oracle.cabo.ui.data.DataObject;
    import oracle.jbo.Row;
    * Controller for ...
    public class deptCsvUploadCO extends OAControllerImpl
      public static final String RCS_ID="$Header$";
      public static final boolean RCS_ID_RECORDED =
            VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
       * Layout and page setup logic for a region.
       * @param pageContext the current OA page context
       * @param webBean the web bean corresponding to the region
      public void processRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processRequest(pageContext, webBean);
       * Procedure to handle form submissions for form elements in
       * a region.
       * @param pageContext the current OA page context
       * @param webBean the web bean corresponding to the region
      public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processFormRequest(pageContext, webBean);
        // Code Addition Started for CSV upload
        OAApplicationModule am = (OAApplicationModule) pageContext.getApplicationModule(webBean);
        OAViewObjectImpl vo = (OAViewObjectImpl) am.findViewObject("deptCsvVO1");
          //if ("GoBtn".equals(pageContext.getParameter(EVENT_PARAM)))
           if (pageContext.getParameter("GoBtn") != null)
          System.out.println("Button Pressed");
              DataObject fileUploadData =(DataObject)pageContext.getNamedDataObject("FileUploadItem");
              String fileName = null;
              String contentType = null;
              Long fileSize = null;
              Integer fileType = new Integer(6);
              BlobDomain uploadedByteStream = null;
              BufferedReader in = null;
                      try
                      fileName = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");
                      contentType =(String)fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");
                      uploadedByteStream = (BlobDomain)fileUploadData.selectValue(null, fileName);
                      in = new BufferedReader(new InputStreamReader(uploadedByteStream.getBinaryStream()));
                      fileSize = new Long(uploadedByteStream.getLength());
                      System.out.println("fileSize"+fileSize);
                      catch(NullPointerException ex)
                      throw new OAException("Please Select a File to Upload", OAException.ERROR);
                      try{ 
                      //Open the CSV file for reading 
                      String lineReader=""; 
                      long t =0;
                      String[] linetext; 
                      while (((lineReader = in.readLine()) !=null) )
                      //Split the deliminated data and
                      if (lineReader.trim().length()>0)
                      System.out.println("lineReader"+lineReader.length());
                      linetext = lineReader.split(","); 
                      t++;
                      //Print the current line being
                      if (!vo.isPreparedForExecution())
                              vo.setMaxFetchSize(0);
                              vo.executeQuery();
                        System.out.println("Trimmed "+  linetext[1].replace("\"", ""));
                      Row row = vo.createRow();
                      row.setAttribute("Deptno", linetext[0].trim());
                      row.setAttribute("Dname",linetext[1].trim().replace("\"", ""));
                      row.setAttribute("Loc",linetext[2].trim().replace("\"", ""));
                      //row.setAttribute("Column4", linetext[3].trim());
                      vo.last();
                      vo.next();
                      vo.insertRow(row);
                      catch (IOException e)
                            throw new OAException(e.getMessage(),OAException.ERROR);
              //else if (pageContext.getParameter("Upload") != null)
              am.getTransaction().commit();
              throw new OAException("Uploaded SuccessFully",OAException.CONFIRMATION);     
    }Thanks,
    Jit

  • Accessing my own class members from the JSP file

    Hi,
    I have created a class by name simple.java.and the package structure is like sridhar.source.useful.In this package i placed my file simple.java.
    Now i import this file with the import statement in JSP like
    <%@ import = "sridhar.source.useful.*" %>
    Now from the JSP file i want to execute some of the methods in simple.java.
    I tried this one by importing the simple.java in my JSP file,but i am getting some errors:
    variables that i have declared in Java files are not defined.
    The JSP is not importing the class simple.java
    I am executing my JSP in weblogic6.1(webserver is IPlanet)
    shall i need to set any classpath for this in the weblogic shell script??
    pls clarify me if any configuration is to be made or not??
    regards
    Naidu

    For JSP with IPlanet/weblogic and imported custom classes:
    Put your class / package in the correct folder. $path is any path you want....
    Ex: package foo, class foorbar must be
    $path/foo/foobar.class
    All classes must be .class, not .jar.
    Weblogic/IPlanet must be configured to have the CLASSPATH
    $path/
    (do not include foo/foobar!)
    The JSP has
    <%@ import "foo.*" %>
    Your class may now be used just like the other imported classes. Say you have an object Foobar with a constructor, you can just say
    Foobar myFoo = new Foobar();
    I do this with my classes, so if you have any questions, just ask.

  • WUC-17 Information was missing from the supplied file download request java

    Dear Forms Guru,
    Can anybody help why i'm receiving this error using webutil.
    WUC-17 Information was missing from the supplied file download request java..
    the result in my jinitiator console are the ff:
    Loading http://oracleserver.hfgmgroup.hfgm:8889/forms90/webutil/webutil.jar from JAR cache
    Loading http://oracleserver.hfgmgroup.hfgm:8889/forms90/webutil/jacob.jar from JAR cache
    Loading http://oracleserver.hfgmgroup.hfgm:8889/forms90/java/f90all_jinit.jar from JAR cache
    RegisterWebUtil - Loading WebUtil Version 1.0.5 Production
    Loading http://oracleserver.hfgmgroup.hfgm:8889/forms90/java/toolbar_images.jar from JAR cache
    connectMode=HTTP, native.
    Forms Applet version is : 90290
    2005-Feb-13 01:48:19.514 ERROR>WUC-17 [VBeanCommon.downloadFromURL()] Information was missing from the supplied file download request java.net.MalformedURLException: unknown protocol: c
    2005-Feb-13 01:48:33.504 ERROR>WUC-17 [VBeanCommon.downloadFromURL()] Information was missing from the supplied file download request java.net.MalformedURLException: unknown protocol: c
    2005-Feb-13 01:48:34.04 ERROR>WUC-17 [VBeanCommon.downloadFromURL()] Information was missing from the supplied file download request java.net.MalformedURLException: unknown protocol: c
    Many thanks in advance...
    benjie

    Benjamin,
    WebUtil tries to download the jacob.dll to the client. The error message you get is most likely caused by teh following section in teh webutil.cfg file
    install.syslib.location=/webutil
    ## Do not change the following lines unless instructed to do so
    install.syslib.0.7.1=jacob.dll|94208|1.0|true
    install.syslib.0.9.1=JNIsharedstubs.dll|65582|1.0|true
    install.syslib.0.9.2=d2kwut60.dll|192512|1.0|true
    ## But you can add your own libraries in here
    #install.syslib.0.user.1=testwebutil.dll|204872|1.0|true
    If you have all these files available on the PC, then most likely the problem can be found in the virtual path setting for this directory
    <virtual-directory virtual-path="/webutil"
    real-path="c:/webutil/lib" />
    in /j2ee/Oracle9iDS/application-deployments/forms/forms90web/orion-web.xml
    Pleae refer to the webutil documentation for teh exact configuration steps.
    Hope this helps
    Frank

  • How to Pass values from XML to JSP??? Urgent Please Help me

    Hi guys,
    I am new to XML, I want to pass values from XML to JSP. I have a xml file with attributes, I should send this values to a JSP file. How is it??? Please Help guys.... its very urgent. Please send me how to do it with an example or atleast any urls related that....
    Looking for ur favourable reply.
    Thanks in advance,
    Sridhar

    in a servlet :
    parse your xml file (see how at the end of the post) and
    put the values you want in the request attributes
    request.setAttribute("value1", value1);
    ...redirect to the jsp
    in the JSP:
    get the wanted attributes:
    String value1=(String)request.getAttribute("value1");To learn how to parse a xml file, pay a look at this page, it explains how to read the XML document to build an object representation, and then how to navigate through this object to get the data
    http://labe.felk.cvut.cz/~xfaigl/mep/xml/java-xml.htm

  • Passing values from a JSP to Action class

    Hi,
    I have one JSP in this I have two select boxes.
    The first select box is populated with default values.
    From the first select box I am selecting the value and moving to the other select box using java script.
    Now the value in the second select box has to be submitted alongwith some other values which I am getting.
    These values are to be submitted to a Action class and further to the form bean using struts.
    In the form tag in JSP I am calling the struts action class.
    The issue here is,I am able to get other values except the values in the second select box.
    I am using simple JSP page to get form values and submitting.
    I am not using struts tlds because of project constraints.
    Please advise on how to pass these values.
    Regards,
    Ram

    If the value from the select box isn't submitted, then it's not inside the form. Check the HTML output of your JSP to debug this problem.

  • How to pass value from main window to pop up window?

    I want to pass a value from the main window (1st form) to pop-up window (2nd form). The first form is of name booking.jsp and 2nd form is of name Fund_booking.jsp. I am using window.showModalDialog to open the window. I think, I have written right code in main window to pass the value but even then I am not able to get it on pop-up window. I am not even able to display an alert on pop-up window saying "hi" by writing a function on save Button in pop-up window. The code is as follows:
    On booking.jsp:
    <script>
    function popup()
    var aForm;
    aForm = D_requisition_id.options[D_requisition_id.selectedIndex].text;
    \\Here I have captured value from a drop down box in my main window form and assigned it to the variable.
    alert(aForm);
    var myObject =new Object();
    myObject.Brandcode = aForm;
    alert(myObject.Brandcode);
    window.showModalDialog("Fund_booking.jsp",myObject,"dialogHeight:400px;dialogWidth:420px;");
    </script>
    <button name="B_FundBooking" tabIndex=4 style='POSITION:absolute;LEFT:393;TOP:292;WIDTH:100;height:24;BACKGROUND-COLOR:buttonface' onClick ="popup()">Fund Booking</button>
    On Fund_booking.jsp:
    <SCRIPT>
    var oMyObject = window.dialogArguments;
    var sBrandcode = oMyObject.Brandcode;
    alert(sBrandcode);
    </SCRIPT>
    Even the following alert is not getting displayed in pop-up window;
    <script>
    function ValidateData()
    alert("Hi");
    </script>
    <button name="B_Save" tabIndex=1 style='POSITION:absolute;LEFT:255;TOP:315;WIDTH:75;height:24;BACKGROUND-COLOR:buttonface' onClick ="ValidateData()">Save</button>
    I am using DIV instead of frames in my both forms. I just want to get that value in my pop-up window to write a query based on which data will get displayed in my table of pop-up window.
    Plz help me to solve this problem.

    just attach the value with its url for example
    String names="java";
    <a href="# onclick="window.open('file.jsp?name='+names);"></a>

  • How to get result from another JSP file?

    I have to write a jsp (my.jsp) to get information from another jsp file (other.jsp).
    The other.jsp return integer value (0 / 1) so that user can tell if certain service is available or not. And in my.jsp I need to collect such result and other information from a text file to make up of a XML string.
    How can I call other.jsp to get the result? Thanks a lot.

    Hi, I think I didn't describe the problem clearly
    enough. In fact, there is a JSP file, and if our
    database is currently connected, the JSP will return
    value 1, otherwise, it will return 0. My java program
    need to get that result, and then form an XML string,
    and send the string back to the client. I'm just
    wonder how can I write such a program to read result
    from JSP file. Thanks a lot.Why is this function implemented as a JSP file? It should be implemented as a bean. It would be simple to get the information you require from that bean.

  • 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

  • How to get values from the page excpet pagecontext.getparameter

    i have a requirement wherein i am passing paramteres from the "submit" button.but the problem being that,i have multiple rows in my page.what is happening is that my "submit" button is passing the values of the previous row,instead of the current row.this is i think because "commit" gets called later and params are passed before it.
    how do i solve this problem
    or if i can get to get paramteres in a advance table layout,i l be able to achieve my requirement.beacuse in advance table layout,i am not able to do pagecontext.getparameter("---" of the item

    thanks guys,
    i did try working with row refrence but it returns a null only.
    my requirement was that i had update functionality as well as "add new rows" on the same advtbl bean.an whenevr i click on "add new row" and submit,i was always gettin the parameters for the previous row.
    now,i have got a workaround to that,by having a radio button to select rows to update and whenever i click on "add new rows" ,i disable the radio button,and get the handle based on the value from radio group.
    but still row refrence dint work for me.i will appreciate if sum1 can send me the code

Maybe you are looking for