https://issues.apache.org/bugzilla/show_bug.cgi?id=46924
Summary: Session is lost when application is reloaded through touching the war file Product: Tomcat 6 Version: 6.0.18 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: adrian...@gmail.com Created an attachment (id=23419) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23419) Example project I tried a very basic example, based on Maven quickstart. web.xml is almost empty, and a jsp page: ================= <html> <body> <% String x = (String) request.getSession(true).getAttribute("x"); if (x == null) x = "0"; int y = Integer.valueOf(x) + 1; request.getSession(true).setAttribute("x", String.valueOf(y)); %> <%= y %> </body> </html> ================= So I start reloading the page. The number increments. I can stop/start or reload the app. The number continue incrementing. Then I touch (with gnuwin32 touch utility) the war file. The Tomcat console displays: ================= 26/03/2009 11:11:28 org.apache.catalina.core.StandardContext reload INFO: Reloading this Context has started 26/03/2009 11:12:02 org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/example] 26/03/2009 11:12:02 org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive example.war ================= You see, it undeployed, and the counter has reseted. Now, I tried delete webapps/example. After some seconds, the war is exploded and same thing as above happens. Then I tried to delete webapps/example/*, leaving the directory empty. This way, I can manually extract the war there, and session is preserved. Charles (Chuck) Caldarale, said this is an inconsistency worth registering. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org