Configuring session cookies in Weblogic

14,158

I was able to accomplish what I needed by making the following changes:

<cookie-domain></cookie-domain>
<cookie-path>/</cookie-path>
Share:
14,158
Mike
Author by

Mike

Updated on June 04, 2022

Comments

  • Mike
    Mike almost 2 years

    I'm pretty new to Weblogic and I'm currently trying to convert a web application that I've been running using Tomcat on my local machine to work with Weblogic since our production servers are weblogic. I'm having trouble configuring weblogic.xml so that I can access session attributes. Currently my weblogic.xml looks like this...

    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <session-descriptor>
            <cookie-name>JSESSIONID</cookie-name>
            <cookie-domain>localhost</cookie-domain>
            <cookie-path>/domain</cookie-path>
            <cookie-secure>false</cookie-secure>
            <url-rewriting-enabled>false</url-rewriting-enabled>
        </session-descriptor>
        <jsp-descriptor>
            <precompile>false</precompile>
            <precompile-continue>true</precompile-continue>
            <keepgenerated>false</keepgenerated>
        </jsp-descriptor>
        <context-root>/domain</context-root>
        <library-ref>
            <library-name>springLib</library-name>
        </library-ref>
    </weblogic-web-app>
    

    This does not seem to be working when I run locally. Do I need to include the port number in the cookie-domain (i.e. localhost:7001)? This seems to be the only glitch I haven't been able to resolve. If anyone has any ideas please help. Thanks in advance.