File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes New Session Created Randomly  in Tomcat 5.0.28 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply locked New topic

New Session Created Randomly in Tomcat 5.0.28

Nilesh Naik

Joined: Jul 18, 2006
Posts: 13
1. I have a typical JSP-Servlet web application running on tomcat 5.0.28.
2. After successful login a new session is created. (in login.jsp) and user specific data is kept in session
3. User moves on through the application . Accesses a JSP ( e.g. PageWithHeavyJavascript.jsp), JavaScript code.
4. After doing some selections etc. PageWithHeavyJavascript.jsp, user browses another JSP ( e.g. plain.jsp) which *does not* have any session related code. At this point *sometimes* a NEW session is created. (By implementing HttpSessionListener I observed that the sessionCreated() methos is getting called everytime and sessionDestoryed() method is never getting called)
5. After lot of debugging I have observed that this happens when lot of Javascript code is called through clicks etc. new session is created. I am unable to link lot of Javascript calls with New session getting created.

Has anybody faced the same problem?
I would appreciate if you can shed some light on this issue... any hint/solution?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: New Session Created Randomly in Tomcat 5.0.28
It's not a secret anymore!