Values disappearing from my JSP page

HI Guys
i am stuck with a problem for which i need your help.i will list my query below
In my JSP i am having a combo box from which i can select values needed for data manipulation and navigation to other page.Firstly i select a value from the combo box in my main JSPand do necessary processing.After navigation to other JSP pages i have a condition that if input successful then return to the main JSP other wise to someother jsp.
Here my problem is that when on successful manipulation when i come back to the main JSP all the values in the combo box disappear. i know that i need to set the values before coming back ,i have done that but i am not able to figure out what is happening still values disappear.
please let me know what i shoud do to resolve this issue.waiting for your replies.
Regards

hi :-)
1. put the value in session
or
2. after successful submission, pass the submitted value in the previous page
Please dont cross post, thank you :-)
http://forum.java.sun.com/thread.jspa?messageID=4487269#4487269
regards,

Similar Messages

  • Values disappearing in my JSP page

    HI Guys
    i am stuck with a problem for which i need your help.i will list my query below
    In my JSP i am having a combo box from which i can select values needed for data manipulation and navigation to other page.Firstly i select a value from the combo box in my main JSPand do necessary processing.After navigation to other JSP pages i have a condition that if input successful then return to the main JSP other wise to someother jsp.
    Here my problem is that when on successful manipulation when i come back to the main JSP all the values in the combo box disappear. i know that i need to set the values before coming back ,i have done that but i am not able to figure out what is happening still values disappear.
    please let me know what i shoud do to resolve this issue.waiting for your replies.
    Regards
    Vikeng

    hi :-)
    set the value of firstname after submit
    <%
    session.setAttribute("firstname", txtFirstname);
    %>retrieve the value of firstname in the submitted page. Note about the scenario when the user first visit the site ;-)
    String firstname = session.getAttribute("firstname");put the value of firstname on our textbox ;-)
    <input type="text" name="txtFirstname" id="txtFirstname" value="<%=firstname%>" />hope you get the idea, i got to go home for now friend. goodluck ;-)
    regards,

  • Keyflex value disappears from page when lov event is fired

    Hi All,
    There is a keyflex field and one lov field in my page. When i select the value from kff and after that selecting any value from lov item my kff value disappears from page.
    Plz help asap.............

    Hitesh,
    Mukul, i can put my own Add another row button and do cusom code,but what about other events?
    Yes, see dev guide and old threads. It has been explained in dev guide claerly and have also replied this in old threads.--Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to retrieve the parameter names from a JSP page ? Urgent Please

    Hello,
    Can anybody tell me how to retrieve the parameter names from the JSP
    page. (without using getParameterNames() method.)
    The problem with the getParameterNames() method is I get the Jumbled output.
    I need it very badly
    With regards
    Ananth R
    email:[email protected]
    [email protected]

    Dear duffymo,
    My primary intention is to convert the JSP form information into a XML file.
    If I do not get the Parameter names in the correct order how can I maintain
    tag order in XML file.
    For ex: (JSP PAGE VIEW)
    Name--
    FirstName
    MiddleName
    LastName
    Address--
    Street1
    Street2
    City
    Country
    &so on
    (XML File to be generated)
    <Name>
    <FirstName>Value</FirstName>
    </Name>
    <Address>
    <street1>value</street1>
    </Address>
    & so on
    If I use getParameterNames() to get all the parameter names(Which form the tag names in the XML file ) the Enumeration object it returns will not be in the same order as the text fields in JSP.From this I can not construct a meaningful XML file.
    order means: Order of entry on the page, from top to bottom
    That's it
    Waiting for your responses

  • Pass the data back from the jsp page to the java code

    Hi,
    I have written an iView that receives an event using EPCF and extracts data from the client data bag.
    I need this iView to pass the data back from the jsp page to the java code.
    I am trying to do this using a hidden input field, but I cannot get the code to work.
    Here is the code on the jsp page.
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId">
    <hbj:inputField id="myInputField" type="string" maxlength="100" value="" jsObjectNeeded="true">
    <% myInputField.setVisible(false);%>
    </hbj:inputField>      
       </hbj:form>
      </hbj:page>
    </hbj:content>
    <script language=JavaScript>
    EPCM.subscribeEvent("urn:com.peter", "namedata", window, "eventReceiver");
    function eventReceiver(eventObj) {
         var url = eventObj.dataObject;
         var funcName = htmlb_formid+"_getHtmlbElementId";
         func = window[funcName];
         var ipField = eval(func("myInputField"));
         ipField.setValue(url);
         var form = document.all(htmlb_formid);
         form.submit();
    </script> 
    Here is my java code
    package com.sap.training.portal;
    import com.sapportals.htmlb.InputField;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    public class ListSalesOrder extends PageProcessorComponent {
      public DynPage getPage(){
        return new ListSalesOrderDynPage();
      public static class ListSalesOrderDynPage extends JSPDynPage{
         private String merong;
        public void doInitialization(){
        public void doProcessAfterInput() throws PageException {
              InputField reportfld = (InputField) getComponentByName("myInputField");
              if (reportfld != null)      merong = reportfld.getValueAsDataType().toString();
        public void doProcessBeforeOutput() throws PageException {
              if ( merong != null ) setJspName("merong.jsp");
              else setJspName("ListSalesOrder.jsp");
    Here is DD
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="SharingReference" value="com.sap.portal.htmlb"/>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="SearchSalesOrder">
          <component-config>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="/pagelet/SearchSalesOrder.jsp"/>
          </component-config>
          <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
        <component name="ListSalesOrder">
          <component-config>
            <property name="ClassName" value="com.sap.training.portal.ListSalesOrder"/>
          </component-config>
          <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>
    After receive event, then call java script function "eventReceiver" and call "form.submit()".
    But .. PAI Logic in Java code doesn't called ...
    Where is my problme ?
    Help me ...
    Regards, Arnold.

    Hi Arnold,
    you should not do a form.submit yourself. Instead you can put a component called ExternalSubmit to your page:
    ExternalSubmit exSubmit = new ExternalSubmit("EX_SUBMIT"));
    exSubmit.setServerEventName("MyEvent");
    This results in a java script funtion on the page which is called "_htmlb_external_submit_". If you call this function the the form gets submitted and your event handler is called.
    regards,
    Martin

  • Writing XML file from a jsp page

    how can i write a xml file from my jsp and store the values and after sometime, for example when the user clicks on the submit button, i check the values from xml file and compare those values from the data base.
    it means both writing and reading xml file from a jsp page...
    urgent help needed......thanks

    You need some API like XSL or JDOM to read data from/to XML file
    you can get a best tutorial from
    http://www.javaworld.com/javaworld/jw-05-2000/jw-0518-jdom.html
    and
    http://www.javaworld.com/javaworld/jw-07-2000/jw-0728-jdom2.html
    after reading both articals you will be able to do both the tasks

  • How do I call a 10g report from a jsp page securly?

    How can I call a report from a jsp page securly? We are migrating from 10g forms to J2EE, and we want to keep using our reports. In forms we were able to do this using a cookie. How can I pass a users credentials to reports without the user having to connect to the database? Single Sign-on isn't an option either.
    Thanks,
    Jim

    Hi Jim,
    If you want to pass the user credentials to the report dynamically, then SSO (Single Sign-On) is the only option I can think of.
    If the user credentials can be hard-coded, then the following 2 solutions are possible:
    1. Use cgicmd.dat file, and write the user credentials in the file.
    2. In your report JSP itself, you could write the following:
    <rw:report id="report" parameters="userid=scott/tiger@mydb">
    Navneet.

  • How to call a report from a jsp page

    Hi
    1) Can anyone please tell me how can i view Discoverer report from a jsp page instead of opening it directly thru plus/viewer.
    2) Please clarify do i need to install Infrastructure and OID for it.
    Please advice.
    Thanks

    You need the AS infrastructure if you want to use connections. If you do not intend using connections, you do not require the infrastructure.
    Note that you cannot pass in passwords in the URL any longer. You do not need to pass passwords if you pass in a Discoverer connection id (but then again - if you don't use connections, then you do need to still pass in the connection information - username, password, database, language, EUL)
    I have a post on my blog that describes how to pass a password using an HTML Form submit - http://oraclebi.blogspot.com/2005/08/passing-password-to-viewer.html
    Thanks
    Abhinav
    Oracle Business Intelligence Product Management
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    Discoverer: http://www.oracle.com/technology/products/discoverer/
    BI Software: http://www.oracle.com/technology/software/products/ias/devuse.html
    Documentation: http://www.oracle.com/technology/documentation/appserver1012.html
    BI Samples: http://www.oracle.com/technology/products/bi/samples/
    Blog: http://oraclebi.blogspot.com/

  • Opening a seeded OAF page from custom JSP page.

    Hi All,
    We have requirement to open a seeded OAF page from custom JSP page.
    When we try to open URL of an OAF page after passing URL input parameters, we are always getting following error:
    'You have insufficient privileges for the current operation. Please contact your System Administrator.'
    On directly accessing the seeded OAF page, its encoding all the input parameters passed in URL. Also some more encoded parameters are getting added to the URL dynamically.
    Is there any standard way exists to invoke seeded OAF pages without passing encrypted parameters to it? Also where can we get more details about
    encrypting OAF URL parameters.
    Any pointers would be appreciated.
    Thanks in advance!
    Saurabh

    Have you duplicated entire Customer Service module's menu in your responsibility?
    or Also ping me the menu name..
    --Prasanna                                                                                                                                                                                                                                                               

  • Executing a shell script from a jsp page

    Hi,
    I'm facing a problem while executing a shell script from a jsp page.
    I'm using Runtime.exec() function.
    It's working fine for single statement scripts.But if the script consists of any database processing and some other processing statements,it's not returning the correct exit status of the process.
    Will u please help me in this.
    If there is any other ways to execute a shell script from a jsp page other than Runtime.exec() like RMI etc,.If so let me know.
    Thanks in advance.

    Hello,
    It's hard to help you but what you can do is listening to the outputs of your script, you should read the output stream and error stream and send them to the default console.
    Check this excellent article : http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=4
    Best regards,
    Olivier.

  • Invoking BPEL Process from a JSP Page 500 Internal Server Error

    Hi,
    I try to invoke a BPEL Process from a JSP Page and receive the following error. I just pasted the example from the Oracle PM Developer's Guide tutorial. Previously I deployed the CreditRatingService BPEL Process.
    Can anyone help me, please?
    D.
    Here is a sequence from my JSP / and the error I get:
    String ssn = request.getParameter("ssn");
    if(ssn == null)
    ssn = "123-12-1234";
    String xml = "<ssn xmlns=\"http://services.otn.com\">"
    + ssn + "</ssn>";
    Locator locator = new Locator("default","welcome1");
    IDeliveryService deliveryService =
    (IDeliveryService)locator.lookupService
    (IDeliveryService.SERVICE_NAME );
    // construct the normalized message and send to oracle bpel process manager
    NormalizedMessage nm = new NormalizedMessage( );
    nm.addPart("payload", xml );
    NormalizedMessage res =
    deliveryService.request("CreditRatingService", "process", nm);
    Map payload = res.getPayload();
    out.println( "BPELProcess CreditRatingService executed!<br>" );
    out.println( "Credit Rating is " + payload.get("payload") );
    500 Internal Server Error
    java.lang.Exception: Erstellen von "ejb/collaxa/system/DeliveryBean"-Bean nicht erfolgreich. Es wurde folgende Exception gemeldet: "javax.naming.NameNotFoundException: ejb/collaxa/system/DeliveryBean not found
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.rmi.RMIServerContext.lookup(RMIServerContext.java:207)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.ApplicationContext.unprivileged_lookup(ApplicationContext.java:257)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.ApplicationContext.lookup(ApplicationContext.java:197)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279)
         at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)
         at _InvokeBP._jspService(_InvokeBP.java:65)
         [InvokeBP.jsp]
         at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    Message was edited by:
    user603180
    Message was edited by:
    user603180
    Message was edited by:
    user603180
    Message was edited by:
    user603180
    Message was edited by:
    user603180
    Message was edited by:
    user603180
    Message was edited by:
    user603180
    Message was edited by:
    user603180
    Message was edited by:
    user603180

    Here is the solution:
    Properties props = new Properties();
    props.setProperty("orabpel.platform", "oc4j_10g");
    props.setProperty("java.naming.factory.initial",
    "com.evermind.server.rmi.RMIInitialContextFactory");
    props.setProperty("java.naming.provider.url", "ormi://localhost/orabpel");
    props.setProperty("java.naming.security.principal", "oc4jadmin");
    props.setProperty("java.naming.security.credentials", "welcome1");
    and several jars have to be added to the project:
    Orabpel.jar , Orabpel-common.jar, oc4j*.jar,
    %ANT_HOME%\lib\ant.jar;
    %ANT_HOME%\lib\xercesImpl.jar;
    %ANT_HOME%\lib\xml-apis.jar;
    %AXIS_HOME%\lib\axis.jar;
    %AXIS_HOME%\lib\axis-ant.jar;
    %AXIS_HOME%\lib\commons-discovery.jar;
    %AXIS_HOME%\lib\commons-logging.jar;
    %AXIS_HOME%\lib\jaxrpc.jar;
    %AXIS_HOME%\lib\log4j-1.2.8.jar;
    %AXIS_HOME%\lib\saaj.jar;
    %AXIS_HOME%\lib\wsdl4j.jar;

  • Sending colour from a JSP page into a MySQL database field

    Dear All,
    I am working on trying to send different colours into a MySQL database field from a JSP page.
    This is so that I can represent different pieces of data on my webpage tables in different colours providing status depending on the user request.
    What is the best way to write JSP code for this?
    thanks,
    Alasdair

    Double-posted:
    http://forum.java.sun.com/thread.jspa?threadID=598637

  • Can EJB's be called from within JSP pages?

    Hi,
    (This is a general question, not necessarily related to OAS in any way...)
    I have read/heard conflicting reports pertaining to calling EJBs from within JSP pages.
    Can anyone tell me if it's possible to reference an EJB session bean from a JSP page? Can anyone point me to some documentation on the topic?
    Any help would be appreciated. Thanks!
    David Christopher
    [email protected]

    Hi,
    Check the following code: http://www.jguru.com/jguru/faq/view.jsp?EID=5314 for ejb example.
    -Ruchi
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Davidc:
    Hi,
    (This is a general question, not necessarily related to OAS in any way...)
    I have read/heard conflicting reports pertaining to calling EJBs from within JSP pages.
    Can anyone tell me if it's possible to reference an EJB session bean from a JSP page? Can anyone point me to some documentation on the topic?
    Any help would be appreciated. Thanks!
    David Christopher
    [email protected]<HR></BLOCKQUOTE>
    null

  • Calling a servlet (in Tomcat) from a JSP Page (in Apache)

    I have a web form in my JSP Page, which upon submits, will send the params to a servlet. The servlet will then process the request and send the results back to the calling JSP Page.
    with that above senario, is there any way for me to reference a servlet (resides in Tomcat) from a JSP Page (resides in Apache HTTP Server)?
    Thanks!

    Apache HTTP server isn't a servlet/JSP engine.
    Your JSP runs on Tomcat, right where the servlet does. Apache just forwards the request.
    %

  • Edit a word document from a JSP page

    hi all,
    i would like to know if it is possible to edit a Word document from a JSP page (without uploading it).
    thanks.

    Technically no. But what you can do is output a word document to the browser with the contenttype "application/msword" and if word is installed it will be opened inside the browser.

Maybe you are looking for