aspose file tools*
The moose likes BEA/Weblogic and the fly likes Lost of sessions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Lost of sessions" Watch "Lost of sessions" New topic
Author

Lost of sessions

Agur Dunit
Greenhorn

Joined: Sep 30, 2008
Posts: 24
Hi,

I have developed an application of two struts Action servlets and one HTML Form. I set an attribute session in servlet1. The servlet1 waits for 2minutes before forwarding (mapping.findForward) to the HTML Form wich in turn waits for 5 seconds before calling the servlet2. The probleme is that i can't get in the servlet2 the session attribute setted in servlet1. The application runs correctly in Tomcat but not in Weblogic (i use weblogic9.1).

It seems that the session is lost between servlet1 and servlet2, what could be the probleme in weblogic especially when it runs correctly in tomcat?
I have setted the <timeout-secs>600</timeout-secs> and then removed this attribute and the probleme is the same

Thank you in advance for your help.
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
You should use in weblogic.xml a session-descriptor tag with session-timeout(defined in seconds) in it. Is your app like this? Follows link to docs. http://edocs.bea.com/wls/docs91/webapp/weblogic_xml.html#1071982

You should notice that this specific tag can be overridden by the session-timeout element (defined in minutes) in web.xml
Agur Dunit
Greenhorn

Joined: Sep 30, 2008
Posts: 24
Yes, i have set the timeout-secs to 10 minutes in weblogic.xml (<session-descriptor> <timeout-secs>600</timeout-secs>) and set session-timeout to 600 in web.xml. This doesn't solves the probleme!
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Agur Dunit wrote:Yes, i have set the timeout-secs to 10 minutes in weblogic.xml (&lt;session-descriptor&gt; &lt;timeout-secs&gt;600&lt;/timeout-secs&gt;) and set session-timeout to 600 in web.xml. This doesn't solves the probleme!


Should be 10 in web.xml(in minutes). Anyway, I don't think this is the problem than... Really strange... Aren't you using something like sendRedirect??? Maybe forwarding to a different domain? What I mean is, if you have 2 urls mapped for same domain and you change url, weblogic won't keep session than.. Like:

http://www.bankboston.com/someServletHere

http://www.bankb.com/someServletHere

If both names redirecto to same weblogic domain weblogic won't keep sessions if you forward using diferent urls.
That's the only thing I can think from top of my mind and no piece of code to take a look.



[]s
Marcos Maia.
Agur Dunit
Greenhorn

Joined: Sep 30, 2008
Posts: 24
I have tested the application in WLS9.2 and seems to work well!!! So, we have installed the application in WLS9.2.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Lost of sessions