Session expires when servlets are reloaded

Hi
I'm using Sun Java System Web server 7.0 on Windows 2003 server. When I update my servlets the session expires. I update the .reload filen and the servlets reloads perfect, but my users session expires.
Is it posible to reload servlets without session expires ? And how do I do that ?
Regards,
Stian Martinsen
Norway
Edited by: StianNorway on Sep 14, 2007 3:59 AM

I don't know about Sun's server but with Tomcat, if you are careful to make sure that every object bound to session (directly or indirectly) implements java.io.Serializable, Tomcat will save all your session information to disk when the application restarts so they are all live when it comes back up.
Read the documentation for your server and see if it has a similar feature.

Similar Messages

  • Session expires when a close a new window

    I got a strange problem. That�s the scenario:
    A user is in a page (let�s call it "parent window"), and click on a button that open a new window (let�s call it "child window"), using "window.open" javascript function. He do some operations with the new window and close it. On trying navigate again with the parent window, the session has been expired.
    The curious thing is this problem occurrs under some conditions: when other browser is open, in some other site, this problem don�t occurs; at Netscape, it dont�t occurs too.
    Some light?
    Thanx

    In which case, it probably would be better suited for the JSP forum, but nonetheless...
    Depending on how your app server is set up, most sessions are set to expire after 30 minutes. If you didn't change this setting, it probably still is. A session will also expire if all browser windows are closed, and should persist when a child window is closed.
    You're not explicitly creating a session like you would in a Servlet, are you? You're aware that the session object is implicitly declared in JSP pages, right?

  • Session expired in Servlet, JasperException, NullPointerException

    Hi,
    I get an exception on line "rd.forward(request,response);" when session is expired and so null as you can see in the stack trace. First time, session is null and I don't get an exception. if my session is not expired, it's going in the "else" block and it's works. However, as soon as my session expires, I get the exception as described in my first sentence and as you can see just bellow.
    I really don't understand why and hope someone could help me.
    I'm using jdk1.5 with Tomcat 5.5
    Thanks in advance
    Etienne.
    public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException
         try
              HttpSession session = request.getSession(false);
              int action = Integer.parseInt(request.getParameter(ATTR_ACTION));
              String url = urlLogin;
              if(session == null)
                   session = request.getSession(true);
                   session.setAttribute(ATTR_ERROR,"true");
                   session.setAttribute(ATTR_MESSAGE,MESSAGE_SESSION_EXPIRED);
              else
                   // my code
              RequestDispatcher rd = request.getRequestDispatcher(url);
              rd.forward(request,response);
         catch(Exception ex)
              ex.printStackTrace();
    3 mai 2005 15:27:11 org.apache.catalina.core.ApplicationDispatcher invoke
    GRAVE: "Servlet.service()" pour la servlet jsp a lanc� une exception
    java.lang.NullPointerException
         at org.apache.jsp.webcose_jsp._jspService(org.apache.jsp.webcose_jsp:96)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:673)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:464)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
         at controller.WebcoseController.doPost(WebcoseController.java:2771)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Unknown Source)
    3 mai 2005 15:27:11 org.apache.catalina.core.StandardWrapperValve invoke
    GRAVE: "Servlet.service()" pour la servlet jsp a g�n�r� une exception
    java.lang.NullPointerException
         at org.apache.jsp.webcose_jsp._jspService(org.apache.jsp.webcose_jsp:96)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Unknown Source)

    The error happens in your JSP file that you forwarded the request to, not in the code you posted.
    java.lang.NullPointerException
    at org.apache.jsp.webcose_jsp._jspService(org.apache.jsp.webcose_jsp:96)
    You need to go diagnose the code there and see where you're using an object whose value is null.

  • PLease Help !Jsp Session expired when open Window with "_blank" atributte

    PLease please Help me!
    Hi ,
    I have a problem
    First , all my pages when load evaluate if session exists .
    If not exists session
    this page redirect other page (page_expired.jsp)
    this works correctly ... but
    when page01.jsp open page02.jsp from :
    <form action='page02.jsp' target ="_self"> - >works correctly (load on the same page ..)
    but when :
    <form action='page02.jsp' target ="_blank"> -> this redirect page_expired.jsp
    why this ??
    Sometimes work and Sometimes not work...
    but now it does not work
    Excuse my english not is goog...
    Greetings From Lima - Peru

    Hi
    This problem ocurred when testing on my server of testing(this is in my office) ,
    but when test in the server machine of my house this work!!! great! ,
    not appear session expired.!!
    this theme of configuration ??
    if is ths ?
    what configure ?
    Please Help Me .
    I am using EASERVER 5.2 with JSP
    Bye! Greetings From Lima Per�

  • How to make the session expire when the refresh button is clicked

    Hi All,
    I am writing a Struts application where I want the session to expire when the user clicks refresh button or refresh the page by hitting F5, like any Bank sites. Any help will be appreciated.

    The trick isn't invalidating the session. The trick is detecting refresh requests.
    The Synchronizer Token pattern can handle this.
    Struts can do this for you. Check out [this article|http://www.javaworld.com/javaworld/javatips/jw-javatip136.html?page=1]
    Cheers,
    evnafets

  • Session Expired message when click on page menus

    Hi,
    I am getting session expired message when click on page menus. I am getting an error saying that "page you are trying to access is no longer active". Please help me in this.
    Thanks

    When you display the results of you search, is your Servlet writing the HTML out to the screen or is a JSP doing the display?
    If the Servlet is doing the work, and you POST to it, you will get that message everytime in IE, and you will get a "repost data?" popup in Netscape. That is because POST data comes up once on the request, and Netscape (i think) is the only browser that remembers the POSTed parameters. You should be able to quick fix this by changing the initial communication with the Servlet to a GET -OR- by having JSPs do the display of the results.
    Let me know if you need further help or explaination.
    Yoda

  • Determining when session expires

    I want to be able to track the amount of time that the user spends on my site. I am going to insert a record into a database when the user logs on. I also want to insert a record when the user's session expires either from timing out or closing the browser window or leaving my site. Is it possible to determine when a user's session ends, particularly when it ends via the last two ways.
    Thanks!

    First, you can use a javax.servlet.http.HttpSessionBindingListener object put into the session as an attribute and implement the valueUnbound() method to do the database update. This will be called when you invalidate the session (unless you remove the attribute manually first).
    So the problem is when will the session be invalidated..... There are really 4 things you are looking for:
    1) session times out
    2) user logs out (assuming you provide a log out link that invalidates the session)
    3) browser closes
    4) user leaves site (I assume you mean just goes to some other site in the same browser window)
    1 and 2 are okay, cuz it invalidates the session and calls the valueUnbound method of the object you create as mentioned above.
    For 3 and 4, you can do this in one of 2 ways:
    A) Use frames in your web pages and in the top window, you can have a Javascript call some logout page. However, I'm not convinced that this will work in all situations.
    B) Have an applet in the pages that does something to keep the connection alive. This requires an applet and a JVM in the client to run it. Probably not a good thing to rely on for public sites.
    So really, there is no foolproof or simple way to handle 3 and 4, except to use session timeouts and rely on that.

  • No more than 1 sessions at a time are allowed. Please wait until open sessions expire.

    I have been unable to log into my Actiontec MI424WR router this week, The router returns the message "No more than 1 sessions at a time are allowed. Please wait until open sessions expire." every time I try to log in. This has been going on for days.  Even pulling the power to reboot it did no change.  I'm the only user in the household that would log into it, so I don't understand how this could occur.  How can I get in?
    GLN2

    I really don't want to do a hard reset as I have a handful of custon port forwarding rules that I had created. I'm not a wiz at that, so it would take me too much time to re-create!  I may have no choice. Next time I can get in I will try the backup of the config file. I hope it contains the port forwarding rules.
    The backup function should work fine, I have used it to save my Steam port  forward rules to my hard drive, after a pin hole reset I was able to restore successfully. I did configure mine to 1 session & ALWAYS   logout when I am done.  I have never had any problems logging into the router. But in your case you may need more than 1 session allowed.
    Are you using a native or 3rd party app to remember your router ID/password? IF you are do not do this, you are "defeating" the built in security of the router
    If a forum member gives an answer you like, please give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem. Thanks !!!
    http://forums.verizon.com/t5/Verizon-net-Email/Fix-for-Missing-Inbox-sent-folders-etc-with-Internet-Explorer-11/m-p/647399

  • Tomcat session expires after compiling servlet/ class

    Hi,
    Does anybody know why tomcat(4.1) session expires if you modify a serlvet or class and compile it.
    After compiling I refresh the page and I get session invalidated page. And every time I compile I have to relogin.
    Any ideas ? Is there a work around ?

    In serverl.xml, if you have set the reloadable="true" attribute in your <Context/> tag for your web application then each time one of the servlet classes is modified, tomcat will reload the web application. Set reloadable="false" and this will stop.
    tobes

  • Session expired error not able to log in when restore !

    Hi,
    When user left screen unattended the session get expires and it would ask for two options Restore or OK when restore its asking for username and pssword but when credentials are entered user still not able to login. when open new session with the same credentials user could log in.
    Could some help me with the solution for this.
    Thanks in advance..
    Cheers

    Cannot connect to iTune Store
    http://support.apple.com/kb/ts1368
    http://support.apple.com/kb/ts3297

  • Alert when the session Expires

    Hi Everybody,
    I am doing a web based application in JSF ,in that I want to make an pop up or an alert message automatically when the session expires.please give me valuable inputs on this regardings...
    Thanks in Advance

    Hi,
    yes...I have tested correctly.But here I am giving <a4j:support> to specify the dropdown listbox action.only for this reason the form is not submitting when I use dropdownlist..for ur reference here is a sample code
    <h:selectOneMenu id="animalNameCombobox" value="#{Animal.animalName}" styleClass="sampleDropDownListBox">
                                        <f:selectItems value="#{Animal.animalItemList}"/>
                                        <a4j:support action="#{Animal.animalComboboxAction}" event="onchange" reRender="animalOutputPanel"/>
                                    </h:selectOneMenu>I have given all this within <a4j:outputpanel>..Is there any remedies are there to resolve this issue...please give me a valuable inputs and suggestion on this regardings..
    Regards

  • Hi, I cant login to the facebook app on my iphone 5 ios 6.0.2.  I keep getting an error message saying 'There was an error logging in using single sign on' when im asked to log in again i get a 'session expired' message.  This only started happening yeste

    Hi, I cant login to the facebook app on my iphone 5 ios 6.0.2.  I keep getting an error message saying 'There was an error logging in using single sign on' when im asked to log in again i get a 'session expired' message.  This only started happening yesterday. Anyone else having this problem? Thanks.

    I am having the same problem and took the following steps to mitigate it to no avail.
    1. I deleted the Facebook app on the phone and turned off Facebook in the iPhone's system-wide settings.
    2. I re-enabled Facebook in the iPhone's system-wide settings and reinstalled the Facebook app and logged in again. It worked. For about an hour.
    3. I completely restored the phone to a previous backup (before the problems started) and reenabled Facebook .... reinstalled the app.... and now it works intermittenly. But it hasn't worked in about 12 hours now (just tried a few minutes ago).
    Please advise.

  • Redirect to main jsp when the session expires

    Hi,
    I have a jsp say mainframe.jsp in which I have two frames each having a jsp page say child1.jsp and child2.jsp.
    When the session expires and I when i try do any changes in child2.jsp or child1.jsp, the page redirects to login page and when I login successfully, I am getting redirected to child2.jsp or child1.jsp respectively. But I want it to be redirected to mainframe.jsp.
    Any help is greatly appriciated.
    Thanks in advance.
    Vinod

    I think I am not clear.
    When I try to login after session expiry, I am redirected to child jsp.
    But what I want is that I should be redirected to mainfram.jsp page.
    url in the address shows : ../mainframe.jsp?ID=******
    When my seesion is expired and I try do some manipulation in child1.jsp (which is inside a frame of my mainframe.jsp). it is redirected to login page and from there to child1.jsp instead of mainframe.jsp
    Now the address url shows : ../child1.jsp?ID=********* because of which I am not able to see child2.jsp along with child1.jsp
    What I want : ../mainframe.jsp?ID=********
    this is the code I am using !!
    String destPage = request.getRequestURI();
    response.sendRedirect("../redirect.jsp?dest=" + URLEncoder.encode(destPage));

  • Received a replacement ipod nano in early January . Works well in a sound system but keeps turning off when earphones are used. tried 3 pair but same result. When tried for support comes up as  expires. Says I have to purchase . Why????

    Received an ipod nano replacement in January. It works in a sound system but keeps turning itself of or loosing sound when earphones are used. I have tried several sets os earphones with the same result. When I just tried to seek support my Serial number comes up with warranty expired although the letter says 3 mths warranty. What gives Apple ??? Any one any advice??/

    This is usually an indication that your headphones are not plugged all the way in.  The white plastic part of the headphones should be flush with the Nano and no silver from the plug should still be visible.  The headphone jacks on the new 6G Nanos are a bit tighter than previous generations, so it requires a bit of extra push to get the headphones to pop all the way in.
    Also check make sure the jack is clear of debris such as lint.
    B-rock

  • In indianvisa App. page; when I clicking a link in this page after a long time (2 hours), it shows me session expired. how can i solve it? Please.

    http://indianvisa-bangladesh.nic.in/visa/indianVisaRegDetails.jsp; this is page link. I want to stay in this page for a long time but i can't, they show me a message "session expired". Also I set an add-on namely Session Keeper but don't implement it. Please solve my issue.
    Thanks
    Bishwajit Das

    Many site issues can be caused by corrupt cookies or cache.
    * Clear the Cache and
    * Remove Cookies<br> '''''Warning ! ! '' This will log you out of sites you're logged in to.'''
    Type '''about:preferences'''<Enter> in the address bar.
    * '''Cookies;''' Select '''Privacy.''' Under '''History,''' select Firefox will '''Use Custom Settings.''' Press the button on the right side called '''Show Cookies.''' Use the search bar to look for the site. Note; There may be more than one entry. Remove '''All''' of them.
    * '''Cache;''' Select '''Advanced > Network.''' Across from '''Cached Web Content,''' Press '''Clear Now.'''
    If there is still a problem,
    '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Start Firefox in Safe Mode]''' {web link}
    While you are in safe mode;
    Type '''about:preferences#advanced'''<Enter> in the address bar.
    Under '''Advanced,''' Select '''General.'''
    Look for and turn off '''Use Hardware Acceleration'''.
    Poke around safe web sites. Are there any problems?
    Then restart.

Maybe you are looking for

  • 2504 with new-architecture enabled breaks MAC auth for guest access

    Hello, We have (2) 2504 WLC running version 7.6.120. WLC1 is the local controller and WLC2 is an achor controller for guest-access. We need to incorporate a 3850 for use with the WLC2 anchor. The guest access is currently working with Mac-Auth and Ma

  • How can I add a text substitution for changing st in 1st to superscript?

    I would like to add text substitutions for 1st, 2nd, 3rd, etc. so the letters show up as superscript. I attempted to change the st, nd & rd to superscript in Pages and tried to paste it, but it simply changed it back to regular format. How can I go a

  • Component Source Control

    Has anyone out there come up with a Source Control solution for UCM component development? I am looking for check out/in and version control of resources so that we can better control the development effort. We have inadvertantly propmoted several ch

  • Tutorial on Development Component Project

    Hi, Can somebody send a tutorial on Development Component Project? Is EP (Enterprise Portal) required for using the Development Component Project? Thanks. Regards, Suresh.

  • CC app won't open

    I am not able to open the CC app in the tray or from the progam file. Tried douple clicking the and and also right clicked on the app clicked open. still dosen't open. The app in tray is gray.