We are porting some legacy applications from WebLogic to Tomcat. In Web Logic these applications have the following in their weblogic.xml deployment descriptor:
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 6.0//EN" "http://www.bea.com/servers/wls600/dtd/weblogic-web-jar.dtd">
<weblogic-web-app>
<session-descriptor>
...
<session-param>
<param-name>
CookieName
</param-name>
<param-value>
jsessionid
</param-value>
</session-param>
...
</session-descriptor>
</weblogic-web-app>
Somehow, the inclusion of this element allows the application to send the cookie back through the response to the browser, enabling sticky sessions, which is what we are trying to achieve. There is no code in the application servlets that does anything with the cookies to make this happen. I should mention that we're using a traditional external load balancer to do the balancing, not any container options.
Now that we move over to Tomcat, we would like to maintain the same functionality, hopefully through similar declarative means, without code changes. However, there does not appear to be a similar descriptor that would do this in Tomcat.
When we test the application in the two environments we find that
curl -c cookie {url}
saves a cookie in the file "cookie" under WebLogic, but not under Tomcat.
So I want to know
- How, if possible to achieve same in Tomcat, without coding changes.
- If not possible, how to achieve same in Tomcat through coding changes. In other words, what is WebLogic doing under the covers with this deployment description option?
I've tried researching this but not found any information on what the option does, only information how to set the option, with no information on why you might want to use it. See WebLogic documentation