Session sharing on WildFly is not working

喜你入骨 提交于 2020-01-04 03:17:08

问题


I just migrated from JBoss EAP to WildFly and I am facing some issues with session sharing.

Previously in JBoss EAP, in my web.xml I added the below configuration:

<session-config>
    <cookie-config>
        <path>/</path>
    </cookie-config>
</session-config>

And both the applications were generating the same session id.

But in WildFly the problem is, application 1 will write session as for example 123 in the path /, and if I open application 2 it will override the session as say 456. Now if I refresh application 1 it will again override the session and the process keeps on repeating.

How can I successfully share sessions in WildFly?


回答1:


add jboss-all.xml

<jboss umlns="urn:jboss:1.0">
    <shared-session-config xmlns="urn:jboss:shared-session-config:1.0">
        <session-config>
            <cookie-config>
                <path>/</path>
            </cookie-config>
        </session-config>
    </shared-session-config>
</jboss>

Read this quide

https://docs.jboss.org/author/display/WFLY10/Web+(Undertow)+Reference+Guide



来源:https://stackoverflow.com/questions/35423438/session-sharing-on-wildfly-is-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!