wood burning stoves 2.0*
The moose likes BEA/Weblogic and the fly likes Losing session on WebLogic app server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Losing session on WebLogic app server" Watch "Losing session on WebLogic app server" New topic
Author

Losing session on WebLogic app server

Mark Lorenz
Greenhorn

Joined: Mar 14, 2010
Posts: 3
I am using WebLogic 11gR1 server for a simple web app written in Java, jQuery, and Groovy. It runs perfectly on Tomcat. But on WebLogic, it works fine on the first Ajax call back to the server, with all fields being passed correctly and session being loaded with values needed for future calls (checked in debugger). The problem occurs with subsequent calls that depend on the session values (stored as attributes) - there is NO session! (it is null).

I checked the WL documentation and it says the session timeout defaults to 60 minutes, so that can't be it. I tried running the admin console, but it doesn't find it (port 7001). I checked all the values I can find for the server in Eclipse but nothing applies or gives a clue as to what's wrong.

Has anyone run into this? I don't have experience administering WL...

Note: I am using all defaults currently - I don't have a weblogic.xml file (is it required?) as this project started out on another app server. I do have a web.xml but it doesn't contain anything about session management.
Vicky Vijay
Ranch Hand

Joined: Apr 23, 2008
Posts: 125
Mark Lorenz wrote:The problem occurs with subsequent calls that depend on the session values (stored as attributes) - there is NO session! (it is null).


Clarify the below,

1. Are you getting the Session Object as Null ?

2. Are you able to get the SESSION ID ?

If yes,

Try Iterating through the Session "getAttributeNames()" ..? and find it....

This is to check your attributes
Mark Lorenz
Greenhorn

Joined: Mar 14, 2010
Posts: 3
Thanks for the reply. Yes the session was null. The solution is to include:

jQuery.support.cors = true;

This allows cross-site scripting and results in the same JSESSIONID to be used across Ajax calls.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Losing session on WebLogic app server
 
Similar Threads
Can Weblogic Server be used as a web server???
which weblogic version for starters
Passing Grade for WL exam ?
Passing the session object around..
Performance tune up