Session Data Lost Between JSP's

Hello,
I am using Oracle 10g Application Server (9.0.4) on SunOS 5.8. I am trying to upgrade an application previously written for Oracle 9iAS 9.0.2.
A single JSP (myFile.jsp) is called via a POST operation, and it is initally used to create a frameset that contains two frames. Each frame has a URL link to the same JSP file, with some additional parameters:
<frameset border="0" rows="*,70">
<frame NAME="topFrame" SRC="myFile.jsp?PARAMETER1=hello&amp;PARAMETER2=goodbye"/>
<frame NAME="bottomFrame" SRC="myFile.jsp?PARAMETER1=hello&amp;PARAMETER2=goodbye"/>
</frameset>
The problem is that when myFile.jsp is called to generate the actual page for the frames, all the HttpServletRequest data has gone, and only the parameters passed in the Query String remain. I don't want to lose the original POST data - in fact, when I used this on Oracle 9iAS 9.0.2 it preserved the POST data and added the additional queries from the query string so all the parameters were available.
Has the behaviour of the session manager changed that much between Oracle 9iAS and Oracle 10g 9.0.4? How can I achieve my goal on 9.0.4?
I tried adding the original POST request to the HttpSession variable as follows:
session.setAttribute("PARENT_REQUEST",request);
and then extracting the request data when the JSP is called on subsequent occasions as follows:
HttpServletRequest newRequest = (HttpServletRequest) session.getAttribute("PARENT_REQUEST");
But 'newRequest' is actually empty, and it doesn't create an exception. If I debug the session object I notice 2 things:
1. The session ID remains the same througout all calls of myFile.jsp.
2. The memory location pointed to by the parameter "PARENT_REQUEST" also remains the same, in the format:
com.evermind.server.http.AJPHttpServletRequest@1bd5093
If the session object being passed around by cookies remains consistent, why can I not extract the PARENT_REQUEST attribute from it on subsequent calls to myFile.jsp? Have I misunderstood how HttpSession works? How can I modify my JSP's so that data stored during a session is made available to subsequent calls to myFile.jsp?
I appreciate any insight you can offer!

Has the behaviour of the session manager changed that much between Oracle 9iAS and
Oracle 10g 9.0.4? How can I achieve my goal on 9.0.4?If your experience did suggest something has changed from 9.0.2 to 9.0.4, I would believe that it is more about request management.
If the session object being passed around by cookies remains consistent, why can I not
extract the PARENT_REQUEST attribute from it on subsequent calls to myFile.jsp? Have
I misunderstood how HttpSession works? How can I modify my JSP's so that data stored
during a session is made available to subsequent calls to myFile.jsp?The "request" in the following code
session.setAttribute("PARENT_REQUEST", request);
is just a pointer to the actual request object. Other code, especially the server internal code that manage the http requests and responses can see and manipulate that actual request object. For example, although I am not sure if it is the case, the request objects can be pooled and reused. So it is possible that although "The memory location pointed to by the parameter "PARENT_REQUEST" also remains the same, in the format: com.evermind.server.http.AJPHttpServletRequest@1bd5093", the actual request object at that memory location may have changed. The right way to preserve the original request object is to make a private deep copy of it; however there is no easy way to do that.
Well, an easy way out is to store directly what you need from the original request. If you would like to store the parameters, try
session.setAttribute("origParams", request.getParameterMap().clone());
Although this clone() does a shallow copy, it is probably good enough. To be absolutely sure, you can make a deep copy of everything you need and store them.
Good luck!

Similar Messages

  • Session getting lost between JSPs

    Hi,
    I am working on a application in which a user can upload files using FTP. The files may be of large size, say 50-100 MB and it takes approx 30-60 mins for such uploads. The session timeout for the website is set to 20 mins. The way it works is, from the main browser window there is a link to upload files. This link opens a popup window and through this window the user can upload a file. In this popup window, i have included an iframe which sends a post request to the server every 10 mins to keep the session alive. This is working fine in most of the cases, but sometimes it happens that when the when a call is made to send a post request to the server from the iframe, the session is becoming null & invalid or this happens also after the upload has finished and the "upload successful" page gets loaded. This is a very random behaviour, sometimes it works perfectly fine and sometimes it doesn't. It is not dependent on the time, or the size of the file or the number of times the iframe has submitted the request to the server.
    Any one has any idea why the session is becoming null randomly?

    Hi,
    This should never really happen when you bring up a Web Server or to what so called a loadbalancer in place as ultimately the container which creates the session Object.
    I strongly feel that the Webserver(Apache,Sun App Server or IIS) is not passing on the jessionid cookie value which is actually responsible for this action when we are not using url writing for maintaining. .
    How do test that ??
    try the below code snippet and the rest all is understood on what values you get.
    <%
       //Get the values of respective Properties
       boolean sessionIdFromCookie = request.isRequestedSessionIdFromCookie();
       boolean sessionIdFromUrl = request.isRequestedSessionIdFromURL();
    %>
    From Cookie : <%=sessionIdFromCookie%>
    From URL : <%=sessionIdFromUrl%>Well to sort out problems as these you got to enable passing of jsessionid cookie to the Application Context via Webserver which might call for additional set of configurations from webserver end and AJP part.
    Just as an example let us consider in the case employing IBM http server
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/topic/com.ibm.websphere.base.doc/info/aes/ae/xjta_ihs_int.htmlor a neutral way to fix this issue is to adopt usage of a technique called URLREWRITING.
    How do you do that ??
    A quick google search provided me the below results
    http://publib.boulder.ibm.com/infocenter/wchelp/v5r6/index.jsp?topic=/com.ibm.commerce.admin.doc/tasks/tseurlrewrite.htm
    http://www.adventnet.com/products/qengine/help/load_testing/loadscript_creation/recording_bc/url_rewriting.html
    http://java.boot.by/wcd-guide/ch04s04.htmlHope this might help :)
    REGARDS,
    RaHuL

  • Session (attribute) lost between JSPs

    Hi All
    I've seen many post about losing the session but all of them (the ones I've seen) are different.
    Anyway, I have 3 jsp's, the first only submits a form like
    <FORM METHOD=POST ACTION="SaveName.jsp">
    What's your name? <INPUT TYPE=TEXT NAME=username SIZE=20>
    <P><INPUT TYPE=SUBMIT>
    </FORM>The second one stores the username in the session like
    <%
       String name = request.getParameter( "username" );
       session.setAttribute( "theName", name );
    %>
    <HTML>
    <BODY>
    Your name is <%= session.getAttribute( "theName" ) %><br/>
    <A HREF="NextPage.jsp">Continue</A>
    ....So far everything works fine!
    Then, when I click on continue the third jsp is reached:
    <HTML>
    <BODY>
    Hello, <%= session.getAttribute( "theName" ) %>
    </BODY>
    </HTML>This is only basics, but the last jsp shows 'null' instead of the name.
    I'm runnint tomcat6 behind apache. The only thing added to the apache configuration was
    ProxyPass /tomcat/ ajp://localhost:8010/Maybe I need to do more configuration ? Any suggestions ?
    Thnx
    LuCa

    Hi,
    This should never really happen when you bring up a Web Server or to what so called a loadbalancer in place as ultimately the container which creates the session Object.
    I strongly feel that the Webserver(Apache,Sun App Server or IIS) is not passing on the jessionid cookie value which is actually responsible for this action when we are not using url writing for maintaining. .
    How do test that ??
    try the below code snippet and the rest all is understood on what values you get.
    <%
       //Get the values of respective Properties
       boolean sessionIdFromCookie = request.isRequestedSessionIdFromCookie();
       boolean sessionIdFromUrl = request.isRequestedSessionIdFromURL();
    %>
    From Cookie : <%=sessionIdFromCookie%>
    From URL : <%=sessionIdFromUrl%>Well to sort out problems as these you got to enable passing of jsessionid cookie to the Application Context via Webserver which might call for additional set of configurations from webserver end and AJP part.
    Just as an example let us consider in the case employing IBM http server
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/topic/com.ibm.websphere.base.doc/info/aes/ae/xjta_ihs_int.htmlor a neutral way to fix this issue is to adopt usage of a technique called URLREWRITING.
    How do you do that ??
    A quick google search provided me the below results
    http://publib.boulder.ibm.com/infocenter/wchelp/v5r6/index.jsp?topic=/com.ibm.commerce.admin.doc/tasks/tseurlrewrite.htm
    http://www.adventnet.com/products/qengine/help/load_testing/loadscript_creation/recording_bc/url_rewriting.html
    http://java.boot.by/wcd-guide/ch04s04.htmlHope this might help :)
    REGARDS,
    RaHuL

  • Weblogic portal session data lost

    Hi,
    I have a peculiar scenario where the data set in the HttpSession gets lost intermittently. I could not really figure out a pattern where this occurs.It occurs any where in the application.
    I have a session listener tied to the Session which does not get triggered when the session data is lost in this manner. This makes me to believe that the session itself is not getting killed. but only the data gets lost.
    I am using Weblogic Portal Server 8.1 sp5 on UNIX server.
    Any help is greatly appreciated.
    Thanks
    Raj

    Well, we use the standard authentication:
    [url http://edocs.bea.com/wlp/docs81/javadoc/com/bea/p13n/security/Authentication.html#login(java.lang.String,%20java.lang.String,%20javax.servlet.http.HttpServletRequest)]
    Hope it will work in your case. Good luck.
    Edited by pecanov at 07/05/2007 1:41 PM

  • Session getting lost between two applications deployed on two WLS versions.

    Hi,
    Jdev version 11.1.1.5.
    I am facing an issue of session being getting lost. Let me explain the scenario.
    Our client has a legacy application(xyz) running on Web logic server(10.3.3). We have developed an application which was deployed on Web logic Server(10.3.5).
    The Legacy application will call the developed application using URL invocation. In the legacy application, the logged in user information is stored in session and the same parameter is appended to URL to call the developed application.
    In the developed application, we have a servlet which reads the URL and based on the parameter appended to it, we set the context of the application. Everything is working fine till here.
    But, in the developed application, we have a link to navigate to the legacy application. Once navigated, in legacy application if the user again calls the developed application, the session which was set earlier is lost.
    Because of this, the context is not getting set in the developed application.
    Is there a way, I can resolve this issue? OR can I raise SR with Oracle to look into it. Please suggest.
    Thanks,
    Umesh

    Thanks Frank for the reply.
    Session sharing was not configured in WLS.
    I was searching for Session sharing and I found this article written by Lucas Jellema. http://technology.amis.nl/2012/01/18/sharing-session-state-between-jee-web-application-through-weblogic-session-descriptor-of-sharing-enabled/
    Here it is mentioned that for session sharing, we need to check the Enable session sharing in weblogic-application.xml.
    My question is do we need to make this change in both the application? i.e Legacy application and developed application.
    And it was mentioned in the article that both the web app were deployed to a single Web Logic Server. But in my case the Legacy application is deployed to 10.3.3 and developed application is deployed to 10.3.5.
    In this case will the session sharing works?
    Any how I will let our client know about this change and will give a try.
    Thanks,
    Umesh

  • IDoc Data Lost between ECC and MII Message Listener.

    We have recently experienced some network issues which caused the IDoc's to stop flowing outbound from ECC to MII Message Listener.  This happened 3 times during a network switch reconfiguration.  2 of the three occasions the MII Message listener had to be restarted on the MII server in order to get data to flow again.  Interestingly some of the IDocs that were generated during this outage time were processed by the message listener and some didn't.
    We are running MII 12.0 sp11 and ECC 6.0.  The ECC server and MII server are located in different geographic locations.
    When we look at the ECC system in WE05 we see only sucessful status for the IDoc messages saying the Data passed to port OK. 
    When we check the Message listener on the MII end there it only shows processed successfully.  There are no failed messages or messages without rules.
    Where can I check further to see the IDocs that really didn't make it to be processed by the Message Listener on the MII server?
    Also is it possible that these IDocs that got lost somewhere are still sitting on the ECC or MII servers somewhere where we can re-process them?
    And the Last question is, Why didn't the Message Listener handle the network issue automatically instead of needing to restart it?

    Hi Robert,
    Did SAP ever respond/resolve the ticket you created for this issue? Someone told me that this was a known issue, but I have yet to have it verified by SAP. They asked me to simulate the issue - but our non-prod systems are on a VM server with other systems. So I can't exactly start pulling network cables out - I did drop it from the network a few time while sending IDOCs down - but this failed to hang the processing of the IDOCs.
    We're hopefully going to MII 14/15 next year - but the business is keen to resolve this issue as it has impacted production a few times. The MII sites are in some remote regions and I don't think we can really improve the WAN links much further.
    @Christian - thanks for the link, we don't really have an issue with IDOC's not being received, its just the message processing just hangs and we either need to restarted the services or sometimes the system.

  • All data lost between 13/11/07 and 17/07/08

    When i rebooted my iMac this morning, all my data (emails, received faxes in Pagesender,…) are gone !!
    Is there a way to recover and what can be the reason ?
    thanks,

    Is there a way to recover and what can be the reason ?
    You might be able to use a data recovery utility for any data which was stored on your machine. IMAP e-mail though is stored on the internet service provider. .Mac/MobileMe e-mail is also IMAP, so it too might be making a disappearing act due to the MobileMe migration:
    http://www.apple.com/mobileme/status/
    Otherwise if you aren't using .Mac/MobileMe, and are using IMAP, you can ask your internet service provider to attempt to recover e-mails from their tapes for the last several months.
    Recovery utilities for the Mac can recover to an empty Firewire hard drive at least as big as the internal hard drive. They include Prosoft Data Rescue, Subrosasoft Filesalvage, and Boomerang's Boomerang. If none of these can recover that data, and it was on your machine, you may need to seek the services of a data recovery specialist such as http://www.drivesavers.com/
    Hard drives fail, and you should always have a backup plan*:
    http://www.macmaps.com/backup.html
    Once backed up, and/or recovered to the best of your ability, you can explore one more reason for data being missing, and that's directory damage. But since hard drives failing can have the same symptoms we wouldn't want to make your damage worse by running a directory repair utility on your machine without your data backed up. Let us know once you are recovered? Then we can check and see if directory damage is to blame.
    - * Links to my pages may give me compensation.

  • Data communication between jsp pages in different context

    hi,
    I've two web applications one calling the other. The calling app needs to pass user id but not in the url
    How can this be acheived.?
    Even though i searched in several forums about forward and redirect, i donot have a clear idea.
    Please help.
    Thanks.

    Use POST. The form action URL can just point to a different context.

  • First Hit Session Data Replication

    We are using WLS 5.1 with sp3 in a cluster of three
              servers using in-memory-rep, JSP, and Apache as our proxy.
              Session data replication between a primary and secondary server
              seems to work fine except in the following case:
              1) Make first hit to the cluster. During the JSP processing of
              that hit set some HTTP session data via setAttribute().
              2) Kill-off the primary server (the one that handled the first hit).
              3)Make a second hit to the cluster, it is handled by another
              server (the secondary), the session is recognized as an ongoing
              session however the session data that was set during the first hit is not
              present in the second hit.
              If we make two hits to the first server and set data, then kill-off
              the primary server, the secondary has the data at the third hit. The
              only issue seems to be when the primary is killed after the first hit.
              Anyone have any ideas?
              Thanks,
              -darren
              

    You can configure ClusterServlet in your web server farm (WLAS as web
              servers) to proxy JSP and servlet requests to the WLAS farm (WLAS processing
              your JSP and servlet).
              Set up in-memory replication in your WLAS farm. Session in JSP will be
              replicated.
              Cheers - Wei
              Yen Liu <[email protected]> wrote in message
              news:[email protected]...
              > Hello,
              >
              > I read breifly the section on BEA's online documentation talking about
              in-memory
              > replication and clustering.
              >
              > In it, it mentioned the ClusterServlet and configuring the
              weblogic.properties
              > file to assign servlets to the ClusterServlet so that sessions will be
              handled
              > correctly and all.
              >
              > My question is, "what about JSP" I am using a lot of JSP pages which sets
              > session parameters for the specific user into session objects.
              >
              > Any tips, recommendations will be most helpful.
              >
              > Thanks,
              >
              > Yen Liu
              > 510/870-1169
              >
              > Prasad Peddada wrote:
              >
              > > Darren,
              > >
              > > It shouldn't be the case. After your first hit, when you kill the
              primary
              > > server, when you make your next request you should find all the info in
              the
              > > session. I will post again, if we find the same problem on monday in our
              test
              > > environment.
              > >
              > > Thanks
              > >
              > > Prasad
              > >
              > > Darren Kessler wrote:
              > >
              > > > We are using WLS 5.1 with sp3 in a cluster of three
              > > > servers using in-memory-rep, JSP, and Apache as our proxy.
              > > > Session data replication between a primary and secondary server
              > > > seems to work fine except in the following case:
              > > >
              > > > 1) Make first hit to the cluster. During the JSP processing of
              > > > that hit set some HTTP session data via setAttribute().
              > > > 2) Kill-off the primary server (the one that handled the first hit).
              > > > 3)Make a second hit to the cluster, it is handled by another
              > > > server (the secondary), the session is recognized as an ongoing
              > > > session however the session data that was set during the first hit is
              not
              > > > present in the second hit.
              > > >
              > > > If we make two hits to the first server and set data, then kill-off
              > > > the primary server, the secondary has the data at the third hit. The
              > > > only issue seems to be when the primary is killed after the first hit.
              > > >
              > > > Anyone have any ideas?
              > > >
              > > > Thanks,
              > > >
              > > > -darren
              >
              

  • Passing session data between jsp and servlet

    I have a servlet that I pass data to my jsp.
    I do a session.setAtrribute in the servlet. No problem.
    I get the data no problem in the jsp that I call.
    How do I pass this same data to the another servlet?
    I basically have an array of values that I already have in the existing jsp that has been set in session.
    When I call the secondary servlet, I don't have anything in this session variable related to my array.
    Prior to posting to my next servlet, do I need to do another setAttribute inside the jsp to get the data passed to the servlet?
    Thanks.

    Two different things. The encoding adds this to the URL (after the page, before the query string
    ;jsessionid=ABC123 but only if the user isn't using cookies.
    So in your example, you would do this (maybe):
    <%
      String url = response.encodeURL("Servlet");
    %>
      <form name="form1" method="post" action="<%= url %>?cmd=pay"> ... Or some modification.
    So the difference between encodeing and using a post is that
    1) encoding adds the jsessionid to the url string if necessary. It does nothing else
    2) POSTing will send a request to the provided URL via the POST method, including the inputs of the form as parameters to the URL.
    They really don't interact with each other. It is like asking what is the difference between the Color Orange and thr Size Big? They can both be applied to the same thing, or not... and have no real relation to each other.

  • How the hell does a person share session data between JSP page and a Servle

    1. How the hell does one share session data between a servlet and a JSP page without using a bean but rather using a normal string variable.
    2. When using session scope to access a bean the application complains about not finding the bean on the specified scope, however when I use an application scope the save the same bean, the application does find it.
    Please help!!!!!!!
    SERVLET:
    HttpSession session = request.getSession(true);
    ServletContext servletContext = session.getServletContext();
    customerID = result.getString("CustomerID");
    userName = result.getString("UserName");
    session.setAttribute("UserName",userName);
    session.setAttribute("CustomerID",customerID);
    System.out.println("Customer UserName = " + session.getAttribute("UserName"));
    response.sendRedirect("/economics/subscriptions/default.jsp");
    JSP PAGE:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root xmlns:jsp=http://java.sun.com/JSP/Page mlns:c="http://java.sun.com/jsp/jstl/core" xmlns:sql="http://java.sun.com/jsp/jstl/sql" version="2.0">
    <jsp:directive.page isThreadSafe="true" session="true" contentType="text/xml"/><jsp:output omit-xml-declaration="false"/><jsp:scriptlet>response.addHeader("x-xslt-nocache", "true");</jsp:scriptlet><pml>
    <page type="web" search="y">
         <pageName>Commercial Banking</pageName>
         <jsp:directive.include file="/economics/header.inc"/>
         <jsp:directive.include file="/login.inc"/>
         <jsp:directive.include file="/economics/leftMenu.inc"/>
         <!--<jsp:useBean id="UserName" type="java.lang.String" scope="session" />-->
         <content>
         <searchSum>Commercial - Main Content</searchSum>
         Value = <c:out value="${request.session.getAttribute("UserName")}"/>
         </content>
         <jsp:directive.include file="/economics/rightNav.inc"/>
         <jsp:directive.include file="/footer.inc"/>
    </page></pml></jsp:root>

    For a start, just "session" instead of "request.session" would work better. But why did you post this here and not in the JSP forum? Doesn't seem to have anything to do with Java programming.

  • Lost session data on jsps

    I run a jsp on Tomcat. But the Tomcat says that the session is lost and returns a null pointer. There is no session clear statement in my jsp except its pointing out a null session data.
    It works well when I go to a jsp that comes from a servlet processing. But when I click on link that directly calls on a jsp page, the page doesn't finish loading/errs out.
    What to do with this? This works fine in single-serevr instance. But when it's run on a cluster/shared environment, it doesn't.
    Message was edited by:
    rachehernandez

    I'm new to tomcat itself and to this job :) I'm using tomcat 5.0.28.
    I'm not sure how they do clustering in their setup though.
    It's working fine by in a test standalone mode. I do think there's something wrong with the setup. But how would I know?
    The jsp sometimes work , and most of the times not. It works when you try to refresh the page. It also works when it comes from a servlet call. But when its just an href link, it doesn't. JSP is using an object from the session. It throws an exception when it can't find this object in the session. But when I click on a link that calls a servlet to load a jsp that's using the same session object, how come it can load up.
    What's happening with the session?
    Thanks!

  • JSP Dynpage iView 'Open in New Window' losses session data

    Hi All,
    I have a JSP Dynpage that displays some position holder information based on a position id passed in by the URL query string.  The problem that I am trying to solve is to allow the user to open the iView in its own window by using the 'Open in New Window' option from the button in the upper right of the iView title bar.  When this happens the URL query string is no longer available so the iView has problems.  My solution is to store the position id in the session object then read from that session object when the query string is not available - when opening in a new window.
    But what is happening is that the position id saved in the session object is no longer there when the new window opens.  I have looked else where on this site but all posts seem to deal with data transfer from JSP Dynpage to the JSP page.  This issue is dealing with a page getting re-opened in a new page (browswer). 
    I can't seem to get the session object to work between JSP Dynpages at all, I would think that the data put into the session would stay there untill either cleared or the session ends.  Am I missing some configuration settings?  I have included some of the key code below.
    // GET THE POSITION ID FROM THE URL QUERY STRING
    String PosId;
    PosId = request.getParameter("CKey");          
    if (PosId == null)
         myBean.testing = (String) request.getComponentSession().getValue("PosId");     
    else
         PosId = PosId.substring(6, 14);
         request.getComponentSession().putValue("PosId", PosId);
         myBean.testing = "POSID:" + PosId;
    Thanks for all ideas and help. 
    Don

    All of this logic is within the doProcessBeforeOutput event.  Here is all my java code and JSP...
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <hbj:content id="myContext" >
         <hbj:page title="PageTitle">
              <hbj:form id="myFormId" >
                   <jsp:useBean id="myBean" scope="application" class="MSSBeanPackage.HolderDetailBean"></jsp:useBean>
                        <% response.write("<br>xxxx-" + myBean.testing + "-zzzz<br>"); %>
                        <hbj:textView id="txtEname" text="<%=myBean.getEname()%>" design="HEADER2"/>
                        <hbj:textView id="txtPernr" text="<%='(' + myBean.getPernr() + ')' %>" design="HEADER3"/>
                        <hbj:gridLayout rowSize="1" columnSize="1" cellSpacing="2">
                                <hbj:gridLayoutCell columnIndex="1" rowIndex="1" width="100%" verticalAlignment="TOP">
                                  <hbj:group     id="grpContractData"
                                                 design="SAPCOLOR"
                                                 title="Contract Data"
                                                 tooltip="Contract Data"
                                                 width="100%">
                                       <hbj:groupBody>
                                            <hbj:formLayout id="myForm"
                                                           marginTop="5px"
                                                           marginRight="5px"
                                                           marginBottom="5px"
                                                           marginLeft="5px"
                                                           width="300px"     >
                                                 <hbj:formLayoutRow     id="Row1" paddingTop="1px" paddingBottom="1px" >
                                                      <hbj:formLayoutCell     id="Cell11"     align="LEFT" width="40%" >
                                                              <hbj:label
                                                               id="label_WorkContract"
                                                               text="Work Contract xx"
                                                               design="LABEL"
                                                               labelFor="WorkContract"></hbj:label>
                                                      </hbj:formLayoutCell>
                                                      <hbj:formLayoutCell     id="Cell12"     align="LEFT" width="40%" >
                                                           <hbj:textView
                                                               id="WorkContract"
                                                               text="<%=myBean.getAnsvh_Text()%>"
                                                               design="STANDARD"
                                                           />
                                                      </hbj:formLayoutCell>
                                                 </hbj:formLayoutRow>
                                                 <hbj:formLayoutRow     id="Row2" paddingTop="1px" paddingBottom="1px" >
                                                      <hbj:formLayoutCell     id="Cell21"     align="LEFT" width="40%" >
                                                           <hbj:label
                                                               id="label_HiringDate"
                                                               text="Hiring Date"
                                                               design="LABEL"
                                                               labelFor="HiringDate"></hbj:label>
                                                      </hbj:formLayoutCell>
                                                      <hbj:formLayoutCell     id="Cell22"     align="LEFT" width="40%" >
                                                           <hbj:textView
                                                               id="HiringDate"
                                                               text="<%=myBean.getEntry_Date()%>"
                                                               design="STANDARD"
                                                           />
                                                      </hbj:formLayoutCell>
                                                 </hbj:formLayoutRow>
                                            </hbj:formLayout>
                                       </hbj:groupBody>
                                  </hbj:group>
                             </hbj:gridLayoutCell>
                        </hbj:gridLayout>
              </hbj:form>
         </hbj:page>
    </hbj:content>
    *******************  JAVA
    package MSSPackage;
    import MSSBeanPackage.HolderDetailBean;
    import com.sapportals.htmlb.*;
    import com.sapportals.htmlb.enum.*;
    import com.sapportals.htmlb.event.*;
    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;
    import com.sapportals.portal.prt.component.IPortalComponentContext;
    import com.sapportals.portal.prt.component.IPortalComponentProfile;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    // SAP RFC Imports
    import com.sap.mw.jco.IFunctionTemplate;
    import com.sap.mw.jco.JCO;
    import com.sap.mw.jco.JCO.Table;
    import com.sapportals.portal.prt.service.jco.IJCOClientPoolEntry;
    import com.sapportals.portal.prt.service.jco.IJCOClientService;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    public class HolderDetail extends PageProcessorComponent {
      public DynPage getPage(){
         return new HolderDetailDynPage();
      public static class HolderDetailDynPage extends JSPDynPage{
         JCO.Repository mRepository;
         public void doInitialization(){
              // Define request, context and profile containers
              IPortalComponentRequest reqst = (IPortalComponentRequest) this.getRequest();
              IPortalComponentContext myContext = reqst.getComponentContext();
              IPortalComponentProfile myProfile = myContext.getProfile();
              // Define bean reference to bean
              HolderDetailBean myBean = new HolderDetailBean();
              // Place bean in user profile.
              myProfile.putValue("myBean", myBean);
         public void doProcessAfterInput() throws PageException {
         public void doProcessBeforeOutput() throws PageException {
              // Define request, context and profile containers
              IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
              IPortalComponentContext myContext = request.getComponentContext();
              IPortalComponentProfile myProfile = myContext.getProfile();
              //Get Bean from Profile
              HolderDetailBean myBean = (HolderDetailBean) myProfile.getValue("myBean");
              String sapSystem = "SAP_R3_HumanResources";
              // GET THE POSITION ID FROM THE URL QUERY STRING
              String PosId;
              PosId = request.getParameter("CKey");
              //PosId = "60004790";
              if (PosId == null)
                   myBean.testing = (String) request.getComponentSession().getValue("PosId");
              else
                   PosId = PosId.substring(6, 14);
                   request.getComponentSession().putValue("PosId", PosId);
                   myBean.testing = "POSID:" + PosId;
              this.setJspName("HolderDetailJSP.jsp");
    Thanks for your thoughts.

  • Session is lost when going from a servlet to a jsp

    Any help would be greatly appreciated.
              I can sucessfully go from my jsp page to the Servlet. When in the servlet I have a service method where I place the information from my form on the jsp on a bean. Then I do a session.setAttribute("aBean", aBean) to place the bean in the session. Then do a req.sendRedirect("my.jsp"). Watching it in the debugger, when we leave the servlet our session is cleared and when we do a jsp:usebean to get the bean session from the session it creates a new bean so all the information is gone that was there before. here is my usebean tag where we are getting it from scope,
              <jsp:useBean id="aBean" scope="session" class="com.MyBean"></jsp:useBean>
              Thanks, Trucker

    <jsp:useBean name="helper" scope="session" class=".."/>
              <jsp:useBean name="helper" scope="session" type=".."/>
              ·class="package.class"
              Instantiates a bean from a class, using the new keyword and the class constructor. The class must not be abstract and must have a public, no-argument constructor. The package and class name are case sensitive.
              ·type="package.class"
              If the bean already exists in the scope, gives the bean a data type other than the class from which it was instantiated. The value of type must be a superclass of class or an interface implemented by class.
              If you use type without class or beanName, no bean is instantiate
              In your case you already instantiated the bean “com.MyBean” in servlet and you set bean in session scope. But you are not accessing that bean from servlet. Instead of that you are crating a new bean instance by using class attribute of <jsp: useBean>. So if you want to access the bean already created in servlet you should use type attribute instead of class in <jsp: useBean>. So you have to change your code as follows.
              <jsp:useBean id="aBean" scope="session" type="com.MyBean"></jsp:useBean>
              Then you will not lose the bean created in servlet.
              - Navaneeth

  • How to store jsp session data of different user in util.hashmap

    how to store jsp session data of different user in java.util.hashmap
    and access the data of all user on the server side
    The same example is given in professional jsp but its not working.
    I can use getIds() of httpsessioncontext but it's depricated

    Hi
    I'm trying to make an example.
    With the following codes you can get the date from the session.
    request.getSession().getAttribute("sessionname")
    To store it in a hashmap you could do it like this ->
    Hashmap hm = new Hashmap();
    hm.put(Object key, request.getSession().getAttribute("sessionname"));
    I hope you understand it if not just write it!
    Cyrill

Maybe you are looking for

  • TS1702 Every time I install Skype for iPad it rejects my username and password why

    Skype for iPad rejects my current user name that I use for Mac and iPhone and password.    Why do I have to create a whole new account for Skype.  Is it possible to use all three  devices with the same username and password?

  • Firewire to Thunderbolt adapter

    Is there an adapter that will allow me to plug my thunderbolt external hard drive into a mid 2010 iMac that has no thunderbolt port? For example an adapter that will plug into the firewire port on my iMac and produce a firewire port

  • Dreamweaver CS3 reforderss ColdFusion templates

    Dreamweaver CS3 reorders ColdFusion template code without being asked When opening a Dreamweaver 8 ColdFusion page, Dreamweaver CS3 will reorder some ColdFusion tags. For example: 1. <cfswitch expression="#response.errorcode#"> 2. <cfcase value = "10

  • How to divide SAPS when having two instances on same host

    Hello I wander how to divide SAPS when having two instances on same host. By looking at st06? Thank you in advance

  • Silent Install for WebLogic

    Hi, I am trying to install Weblogic 8.1 in silent mode. I found a web page that talked about using a silent.xml file which I tried. But, I still can't get it to work. Does anyone have a silent.xml file for Weblogic 8.1 they can post here or e-mail at