• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Lost of sessions

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tested the application in WLS9.2 and seems to work well!!! So, we have installed the application in WLS9.2.
 
reply
    Bookmark Topic Watch Topic
  • New Topic