HTTP Sessions...help

dere r 2 servlets and sessions are created in each. Now when i try to retrive d attributes set in first servlet in the second servlet, d attributes set in d first servlet r not getting retrived in d 2 servlet.
can some1 pls tell me y this happens?

ashish.251985 wrote:
dere r 2 servlets and sessions are created in each. Now when i try to retrive d attributes set in first servlet in the second servlet, d attributes set in d first servlet r not getting retrived in d 2 servlet.
can some1 pls tell me y this happens?As cafal said, is it really that difficult/ time consuming to type 'the' instead of 'd'? 'Someone' instead of 'some1'?
Why it happens is because you're probably getting a new session. Of course,without any code it's not easy to guess.
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
(Yes I know it's on JavaRanch but I think it applies everywhere)
Edited by: nogoodatcoding on Oct 18, 2007 6:42 AM

Similar Messages

  • URGENT http session HELP PLEASE

    Hello all.
    i work in http session...after i redirect in https(login.jsp for example)
    in JavaBean for Login.jsp try get connection with all object or JavaBeans from last http session ...but i cannot do it.
    Where my problem ?
    How i can have access across sessions?
    Help me please.

    i don't understand your meaning exactly,but i think what you mean is maybe to make a bean accessible across the session?is that right?if yes,you can set the scope attribute to session,such as:
    <jsp:useBean id="..." scope="session" class="...."/>

  • Bw web report plugin http session hangs at the server side

    Hi,
    I am having problems when closing the browser of a BW web report. After I closed the browser by going File->close, I ran SM04 and found out the Plugin HTTP session hangs at the server side.
    How can we terminate the Plugin HTTP session at the server side when user closes the internet browser?
    I did implement a logoff function at my web template, if user clicks on the logoff, the Plugin HTTP session is terminated at server side correctly. But As you know, 50% of time user will close the report by closing the internet browser instead of clicking the logoff. That leaves lots of hanging Plugin HTTP sessions at our server side.
    By the way, we actived our BEX service at the SICF.
    Thanks for help!
    JA

    Hi
    If you want to avoid a blank page with logoff button, add opener=0
    <a href="<SAP_BW_URL CMD='LOG_OFF' ~command='logoff'
    >" onClick="javascript:window.close(opener=0);">Log off</a>
    If you want to close the session via X, use this code:
    create a sapscript function
    function closeSession()
    logoff()
    window.unload=CloseSession()
    However, the Plugin HTTP session isn't killed.
    Regards

  • In-memory replication of http session is not working in BEA7 cluster

              Hi everyone,
              I have 3 managed servers in Bea7.0 SP4 in a cluster. The client requests are sent
              through apache web server. I have given cluster address as URL in httpd.conf of
              apache server which sends the client requests for dynamic pages such as JSPs and
              servlets to the weblogic cluster.
              Load balancing is working fine. I ensured this from the log files of all the 3
              servers. All the 3 servers are getting different client requests and thus load
              balancing is working.
              Now, I wanted to achieve Fail-over. I do not think that i should use proxy plug-in
              for this. I feel the cluster itself will handle fail-over provided i make the
              http session as memory replicated.
              I updated the weblogic.xml with the following entry :
              <session-descriptor>
              <param-name>PersistentStoreType</param-name>
              <param-value>replicated</param-value>
              </session-param>
              </session-descriptor>
              I guess this is sufficient to make the http session as cluster aware.
              But when I shutdown server1, the user connected to server1 will be kicked out
              of the session and come to login page through server2 or server3 which are running
              fine.
              Could anyone help me to achieve http session as cluster aware. Does it indicate
              that I have to go for WLS proxy – HttpClusterServlet to achieve fail over for
              http session ?
              BTW, for your info, i am using setAttribute() and getAttribute() while manipulating
              the session.
              thanks in advance.
              

              Hi Ryan,
              Thanks for ur valuable input.
              I can see failover working.
              But, I can not continue with the same session in my application.
              I printed session Ids before and after failover, I found both are different.
              I guess session replication is a responsibility of weblogic/apache plugin.
              If not please let me know which all settings I should do to make failover working?
              Thanks again.
              Plad
              "ryan upton" <ryanjupton at learningvoyage dot com> wrote:
              >Plad,
              >
              >Are you trying to gracefully shut down the server? If you are then the
              >problem that you say you can't identify is simply the server's default
              >behavior which is to wait for all non-replicated sessions to be dropped
              >or
              >timed out before killing the process. Try forcing the shutdown: kill
              >-9 the
              >PID or CTRL-C if you started the server from the command line. You can
              >also
              >check the ``Ignore Sessions During Shutdown" checkbox under the server's
              >control tab in the admin console, this should allow you to shut down
              >gracefully without waiting for session timeout. BTW your sequence is
              >off
              >in #5 below, the replication doesn't occur upon failure, the replication
              >has
              >already happened once you created the session object on the first server,
              >I
              >think maybe you're confusing replication with failover.
              >
              >~RU
              >
              >"Plad" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Hi,
              >> I have 2 managed servers in a cluster.
              >>
              >> 1. I have got a DNS name configured which maps to these 2 managed server's
              >IP
              >> addresses.
              >> 2. I can browse my site using this DNS name.
              >> In HTTPD.conf I have :
              >>
              >> ServerName dev.a.b.net
              >>
              >> <IfModule mod_weblogic.c>
              >> WebLogicCluster 10.1.38.232:7023,10.1.34.51:7023
              >> MatchExpression *.*
              >> </IfModule>
              >>
              >> LoadModule weblogic_module modules/mod_wl_20.so
              >>
              >> 3. I have adeded session descriptor in weblogic.xml , also enabled
              >proxy
              >plugin
              >> in weblogic console.
              >>
              >> 4. I tested accessing my application using DNS url after shutting down
              >alternatively
              >> each manaed server. I can access application.
              >>
              >> 5. Now, problem comes when I access a managed server1 , keeping server2
              >down.
              >> I am able to access my application.
              >> Now, I start the server2.
              >> (Here I am supposing that replication should occur)
              >> Then I am shutting down server1.
              >> But, this time the server log shows me following:
              >>
              >>
              >> 9:58:51 AM GMT+05:30 NOTICE Web application(s) chlist still have
              >non-replicated
              >> sessions after 2 minutes of initiating SUSPEND. Waiting for non-replicated
              >sessions
              >> to finish.
              >> 10:00:51 AM GMT+05:30 NOTICE Web application(s) chlist still have
              >non-replicated
              >> sessions after 4 minutes of initiating SUSPEND. Waiting for non-replicated
              >sessions
              >> to finish.
              >>
              >> I am unable to make out where the problem is?
              >> Can it be a problem of Liecense? Is there any specialcluster liecense
              >for
              >weblogic8?
              >>
              >> Hoping to get replies.
              >> Thanx.
              >> Plad
              >>
              >> "ryan upton" <ryanjupton at learningvoyage dot com> wrote:
              >> >See my reply to your first post, but I've also added a few comments
              >here.
              >> >
              >> >"jyothi" <[email protected]> wrote in message
              >> >news:[email protected]...
              >> >>
              >> >> I guess someone from bea support team only can answer both your
              >question
              >> >and mine.
              >> >> As per my knowledge, we do not need to do any setup at Apache
              >side
              >> >regarding
              >> >> cluster other than mentioning cluster address as URL while
              >contacting
              >> >WLS
              >> >> from apache.
              >> >>
              >> >> I hope someone from Bea, will help us. I do not think that we
              >> >go for
              >> >WLS
              >> >> proxy plug-in using HttpClusterServlet for making session replication.
              >> > I
              >> >strongly
              >> >> feel that the cluster itself be able to manage the fail-over of
              >> >http
              >> >sessions
              >> >> provided we put the entry "PersistentStoreType" in weblogic.xml
              >> >regarding
              >> >> the session replication.
              >> >>
              >> >
              >> >The cluster does handle the management of Sessions. The clustered
              >> >applications still create the Session objects and the cluster manages
              >> >them
              >> >as per your deployment descriptor settings (replicated, JDBC, File)
              >however
              >> >the proxy has to be aware of which server the client has an affinity
              >> >for
              >> >(only with replicated sessions) and it does that by reading a cookie
              >> >passed
              >> >back from the server that handled the initial request and created
              >the
              >> >primary session object. The proxy has a list of both the primary
              >and
              >> >secondary server locations from this cookie that it can use to failover
              >> >the
              >> >request if the primary server fails. Clusters _DO NOT_ failover nor
              >> >do they
              >> >load balance, that's the job of your proxy, whether you're using the
              >> >HTTPClusterServlet, WLS Plug-in or a more sophisticated hardware load
              >> >balancer like Big IPs F5
              >> >
              >> >> jyothi
              >> >>
              >> >
              >> >~RU
              >> >
              >> >
              >>
              >
              >
              

  • Dynamic reloading in iWS 6.0 causes my http session to be lost

    Hi,
    I have a problem with dynamic reloading in iWS 6.0 Sp2 on Solaris 8. I have not set the reload-interval for the class-loader, in fact i haven't included anything related to the classloader in the web-apps.xml file.
    The default behaviour is observed, the classes are reloaded every 30 seconds. So far, so good.
    I have seen that if a change a class, iWS reloads the entire application, destroying all the servlets in it. This destroys my HTTP session.
    The same behaviour is observed in a redeployment, and in a reloading of config files.
    Is there any way of avoiding this?
    Thanks.
    By the way, could anyone describe the classloader architecture of iWS.
    Juan

    Scott,
    Does the problem only occur on MSIE clients? Do this work properly on Communicator? If so, you may be running into a problem with how MSIE determines the maxage for a cookie.
    The criteria that IE uses for creating a new session is the length of time that a session has been alive. For this reason, when a user tries to connect to a web application on the iWS webserver through IE, the time on the client server and on the webserver must be set correctly. Otherwise, the user could experience problems with session data getting lost or discarded by the client.
    This problem does not occur on Netscape browsers, as Netscape browsers set the cookie using the client-side clock and the maxage sent by the server.
    Refer to this technote and see if the helps:
    http://knowledgebase.iplanet.com/ikb/kb/articles/4704.html

  • Https session lifetime

    How can lifetime of a secure session be controlled in OC4J 9.0.3-9.0.4?
    Is "session-timeout" parameter in web.xml valid or is the SSL session controlled by other parameters?
    We are migrating to https an application that worked properly in http mode, and sessions expire now after just a few seconds. We can't find where to config https session timeout. OC4J documentation is very vague regarding to secure applications.
    Thanks,
    Modulab Team

    Having the same problem for more than 1 week, couldn't find a solution. Session expires in a very short time in https. We're using standalone OC4J (9.0.3). Do I have to change it with AS now ? Isn't there any other solution, patch or something like that ?
    Any kind of your help would be greatly appreciated since thousands of WEB users of our institution CAN NOT use all of our https WEB apps.
    Regards,

  • Xfce4-session-helper NOT FOUND

    After upgrading xfce4-session the other day,
    [PACMAN] upgraded xfce4-session (4.10.0-6 -> 4.10.0-7)
    These errors appear in syslog:
    Apr 29 13:27:56 arch-top slim[342]: (xfce4-session:397): xfce4-session-WARNING **: Unable to launch "xfce4-settings-helper": Failed to execute child process "xfce4-settings-helper" (No such file or directory)
    Apr 29 13:27:56 arch-top slim[342]: (xfce4-session:397): xfce4-session-WARNING **: Unable to launch "xfce4-settings-helper": Failed to execute child process "xfce4-settings-helper" (No such file or directory)
    They appear twice, together, like above (on startup).

    According to http://www.xfce.org/about/tour (one of the first hits for  xfce4-session-helper), this helper was merged into a settings daemon in 4.10. Either it's a bug or you have some leftover bits from 4.8.

  • How to disable weblogic built-in HTTP session filter?

    Hi,
    I want to use my own HTTP seesion filter to manage HTTP session on weblogic clustered servers. It seems that weblogic servers plugin its HTTP session filter already for servlet. How can I use my own HTTP session filter to replace WebLogic built-in session filter?
    Thank you for your help.

    Could you be more elaborate on your requirement.
    Weblogic servers plugin provides a way to handle requests based on url content. or content type and so on, it dosent do much with users sessions other than for session stickyness.

  • Closing HTTP Sessions

    Hello
    I'm looking for a way to close open HTTP Sessions on the J2EE. I know how to close the session in the WebApplication and I know how to modify the session timeout but that's not what I'm looking for. I need to be able a selected session on the J2EE.
    Through telnet I'm able to list the sessions with HTTP_SESSIONS full. Is there a way to close sessions this way?
    Thank you for your help.

    Hi Christian,
    There is no tool or command to close the http sessions on the j2ee engine. If this was allowed you could end up deleting perfectly good user sessions. In case you see a build-up in http sessions i would say this needs to be investigated.
    Greetings, Myriana

  • Monitor HTTP Sessions

    Hi,
    I want to monitor all http sessions on the SAP Portal. For this I know two possibilities
    - In the Visual Administrator -> Security Provider you can access the login sessions, but these are only the sessions of the authenticated users
    - In the NetWeaver Administrator -> System Monitoring, but there you can only see the amount of currenthttpsessions on the different servers
    I hope you can tell me where I'm able to see all current http sessions (anonymous and authenticated), and not only the amount.
    Bye,
    Timo

    Dear Timo,
    maybe Actiivty report can help on your case.
    http://help.sap.com/saphelp_nw04/helpdata/en/58/728ea01cf64fff996b827f2a06f9b1/content.htm
    http://wiki.sdn.sap.com/wiki/display/EP/CreatingaPortalActivityReportIviewformonitoringPageandIview+activities
    Please remember to evaluate the replays, this incentive the SDN to keep growing,
    regards,
    Fabio

  • Scope of component session and http session

    Hi,
    I wish multiple iviews to share the same information.  I am unsure however of the scope of portalcomponentsession, as opposed to http session. I have read the docs, and they are unclear as to the life and scope of these 2 sessions within portal.  Which one is tied to the user?  And which one is available over multiple iviews.
    I would appreciate any help with this
    Thanks
    Mariana

    Hi Mariana,
    > I am sorry
    No problem at all
    > I did not want to close the topic by mistake
    Just for explanation: If you give ten points (they call it blue, my eyes say black), this star is marked in the overview and somehow displaying "solved". In addtion, if you have marked a question as question, you can mark it as answered. As long as you don't do one of both things, you can reward points (2, 6) also in between without trimming your chances to get additional answers.
    > I did not de-mark the question,
    > I just replied to the post.
    When you initially opened the thread (that was no reply), it <i>seems</i> that you've de-marked this thread as question (the standard is: it is a question).
    Anyhow, some people seem to have made the experience that they definitely did not de-mark the thread as question, but it wasn't marked as question, anyhow.
    In this case, a short and friendly mail to [email protected] with the problem stated and alink to the thread concernced will help to repair everything...
    Best regards
    Detlev

  • How to keep the current http session after returning from external web site

    Hi,
    When I use the response.sendRedirect api to redirect the web page to the external payment site, after payment and return back to the current application, I found that the current http session is lost.
    How to keep the current http session after returning from external web site?
    Thanks

    You should make your sidebar1 and sidebar2 fixed positioned. Make your content DIV fluid.
    This should help you: http://www.glish.com/css/7.asp

  • HTTP session sharing

    Hi,
    We have a need for session sharing among the different JVMs and have been trying the application cluster functionality with zero luck. Now we are thinking of looking into coherence because by reading the documentation we came to know this is something we could accomplish it. Since being a very new on this, have anyone done this and if you have can we get some information on how to do it. We will really appreciate your help on this.
    Thanks,
    Raj

    To better understand the background of your root problem,
    1) which Application Server product are you using?
    2) the term "clustering" may mean different things to different App Server implementations. Does your reference to clustering also mean "Http Session Replication" has been specifically enabled, or that by simply clustering JVMs you expect this to happen automatically?
    3) is access to the session needed by the same web app or different web apps in the JVMs?

  • EJBTransactionRolledbackException occurs when load EJB from HTTP session

    A stateful session bean that contains user information is stored to HTTP session once a user is successfully logged in. Subsequent requests has to go through a security filter where in the filter it validates if the session contains this stateful session bean. For some reason I get EJBTransactionRolledbackException when I try to call a method from the EJB.
    The method is called and User object that contains correct information is returned. However on client side it always throws EJBTransactionRolledbackException. Following is stack trace. Any suggestion or help is much appreciated:
    javax.ejb.EJBTransactionRolledbackException
         at com.sun.ejb.containers.BaseContainer.mapBusinessInterfaceException(BaseContainer.java:1482)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1396)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:205)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:83)
         at $Proxy494.getUser(Unknown Source)
         at com.company.comm.server.security.SecurityFilter.validSession(SecurityFilter.java:112)
         at com.company.comm.server.security.SecurityFilter.doFilter(SecurityFilter.java:78)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
         at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
         at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: javax.ejb.TransactionRolledbackLocalException: Client's transaction aborted
         at com.sun.ejb.containers.BaseContainer.useClientTx(BaseContainer.java:3394)
         at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:3274)
         at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1244)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:195)
         ... 32 more

    Apparently the GlassFish installation (or the environment) has got some problem. Tested the deployment on 4 different GlassFish servers that are installed on different machines and none of them has this problem.

  • Measure http session objects

    Hi,
    I repost this message in hope someone could help me in SEEING it :
    i am looking for some code (if any exists) to do metrics on what is really hold in the http session :
    how can i get info on :
    1. nb of user sessions actually in memory
    2. for a given session, what is the size of all objects in the session
    This can help in sizing server memory.
    Perhaps there is some servletinfo utility somewhere that i can reuse.
    Thanks
    HYA

    I don't know what kind of container you are running your application in, but some have tools for analyzing the performance and memory management of the container. For example Oracle's Enterprise Manager for Oracle's containers for Java (OC4J), lets you see these things. I'm not sure if other servers like Tomcat provide the same thing, but you might want to look into that. Hope that helps.
    Galen

  • PCD_service https session

    Hi,
    We have federation among 2 portal. When we are doing a load testing,then we are seeing an issue with https session increasing and impacting the performance of Portal Server.
    Note : we are seeing lot of user session of PCD_service user in Visual Admin.
    Any idea will really help ?
    Edited by: Pawan  Kumar on Aug 26, 2011 6:13 PM

    Having the same problem for more than 1 week, couldn't find a solution. Session expires in a very short time in https. We're using standalone OC4J (9.0.3). Do I have to change it with AS now ? Isn't there any other solution, patch or something like that ?
    Any kind of your help would be greatly appreciated since thousands of WEB users of our institution CAN NOT use all of our https WEB apps.
    Regards,

Maybe you are looking for