File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes session cookie  problem when UAT and production  runs at same time by a user. 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 "session cookie  problem when UAT and production  runs at same time by a user. " Watch "session cookie  problem when UAT and production  runs at same time by a user. " New topic
Author

session cookie problem when UAT and production runs at same time by a user.

Raak Das
Greenhorn

Joined: Oct 25, 2010
Posts: 3
We have a UAT and production application running on different port deployed in two separate weblogic servers..

http://localhost:7001/app1 for UAT

http://localhost:7002/app1 for production

UAT is replica of production.
The problem is user can’t use both at the same time in the same machine, because if you login in to one, will get log out from another(happens both in IE and firefox).
looks like session cookie in the browser is over written. I cant use different session cookie name since ear deployed in to both weblogic is same.Is there an another way to solve this issue ?
How can this be prevented. Content of weblogic.xml is below.
Is there any expamles or links for another solution Please help.

<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
<session-descriptor>
<session-param>
<param-name>
CookieName
</param-name>
<param-value>
SESSIONID2
</param-value>
</session-param>
</session-descriptor>
<jsp-descriptor>
<jsp-param>
<param-name>
pageCheckSeconds
</param-name>
<param-value>
1
</param-value>
</jsp-param>
<jsp-param>
<param-name>
verbose
</param-name>
<param-value>
true
</param-value>
</jsp-param>
<jsp-param>
<param-name>
keepgenerated
</param-name>
<param-value>
true
</param-value>
</jsp-param>
<jsp-param>
<param-name>
precompile
</param-name>
<param-value>
false
</param-value>
</jsp-param>
<jsp-param>
<param-name>
printNulls
</param-name>
<param-value>
false
</param-value>
</jsp-param>
</jsp-descriptor>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>


Deepak Pant
Ranch Hand

Joined: Feb 13, 2004
Posts: 443
I have faced this issue in our UAT and PROD environments for both IE and Firefox. The only way I know is to have different cookie names in the weblogic.xml file.

Simple way is to have @@ENV_NAME@@_JSESSIONID in the weblogic.xml file. Then using replace the value of @@ENV_NAME@@ with a prefix that you can read from properties file.

But this would mean two different EAR files for two environment.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: session cookie problem when UAT and production runs at same time by a user.
 
Similar Threads
Migrating from Weblogic to JBoss
How to precompile JSP on WebLogic6.1
jsp page appears in xml tree format. how can i fix this?
Can't replicate session on clustered weblogic
MIgrating from weblogic to jboss