HttpSession expired.

I am migrating an application server from Weblogic 5.1 to Sun App Server 8.2. I have used the migration tool and it worked partially.

1) How to migrate the weblogic.properties file in the Weblogic Server to Sun App server ie. where should the properties described in the weblogic.properties file be added?

2) Now i am having a session problem. The session created by the first request of the client is not being recognized by the second request from the same client. I am using cookies to track the session , but for the second request from the client i am getting request.getsession(false) as null . Whereas when i run the server in weblogic i get a value for this. I have tried including the session-properties(session-timeout set to 20 mins & 'EnableCookies' set to true) element in the sun-web.xml file.

It would be of great help if anybody could help me out.

Thanks in advance.

[920 byte] By [grace777a] at [2007-11-27 1:34:07]
# 1
Please help. It's urgent.
grace777a at 2007-7-12 0:41:09 > top of Java-index,Application & Integration Servers,Application Servers...
# 2

The Migration Tool only migrates the following elements from Weblogic.properties:

Data Sources

Connection Pool

Database Driver

Startup Classes

Thread Pool Setting

The rest of the elements need to be migrated manually. They need to go into the <domain>/config/domain.xml.

HTH,

Satish

sats_ia at 2007-7-12 0:41:09 > top of Java-index,Application & Integration Servers,Application Servers...
# 3

Thankyou for the response.But still i have doubt.

I am deploying a j2ee-application which has a web module.The portion of weblogic.properties which manages the session is:

weblogic.httpd.session.cookies.enable=true

weblogic.httpd.session.cookie.name=WebLogicSession

weblogic.httpd.session.sessionIDLength=10

weblogic.httpd.session.timeoutSecs=1200

For the above code i have modified the sun-web.xml for the web module as:

<session-config>

<session-properties>

<property name="timeoutSeconds" value="1200" />

<property name="enableCookies" value="true" />

<property name="enableURLRewriting" value="true" />

<property name="sessionIDLength" value="10" />

</session-properties>

<cookie-properties>

</cookie-properties>

</session-config>

Is it proper way ? As I read that 'Individual web applications can override the domain.xml settings using the corresponding elements in their sun-web.xml files'.

Why am i not getting the session stored or if it is stored not recognized by the second request from the client with the cookie? Could you please help on this?

grace777a at 2007-7-12 0:41:09 > top of Java-index,Application & Integration Servers,Application Servers...
# 4
Please help.I have been stuck with this past 2 week .I dont have any idea as to why the request.getSession(false) gives me a null value when the application is deployed in Sun app Server 8.2 whereas gets a value when deployed on Weblogic.
grace777a at 2007-7-12 0:41:10 > top of Java-index,Application & Integration Servers,Application Servers...
# 5
Atlast got the reason. It was a bug from the client side. The client was not setting the cookie as the header of the response, it was sending the cookie value as a post data.Now the issue is fixed.But it worked for Weblogic5.1 !!!
grace777a at 2007-7-12 0:41:10 > top of Java-index,Application & Integration Servers,Application Servers...
# 6

It's true that I got the reason for this. It is because the client was not setting the Header - 'Cookie' with the value - 'JSESSONID=sessionid_val'. It was sending it as part of the request body. Once if the client sets it as the header - it works fine.

But it used to work without setting the cookie as header for Weblogic.

So is there any way that the server can recognize the session without getting it from the request header - instead from the request data.

As some clients cannot be modified, we need to do something from the server side. Is there any other way to get the session from the sessionid mentioned in the body of the request.

Case 1 -

ie. Request header : "Cookie" - "JSESSIONID=4ba01014251735879c3f42967d22"

in the Server for this request with the above header :

request.getSession().getId() = 4ba01014251735879c3f42967d22

-

Case 2 -

In the request there is no header for 'Cookie' but the value is send as the the request (post) data as 'JSESSIONID=4ba01014251735879c3f42967d22'

in the Server for this request :

request.getSession() = null

request.getParameter("JSESSIONID") = 4ba01014251735879c3f42967d22

-

In case 2 is there any way to get the Session corresponding to the sessionid -4ba01014251735879c3f42967d22 ?

It would be of great help if anybody could give some solution.Atleast whether it is possible or not.

Thanks in advance.

grace777a at 2007-7-12 0:41:10 > top of Java-index,Application & Integration Servers,Application Servers...