웹어플리케이션서버
Tomcat7에서 세션 쿠키 네임 설정
미랭군
2015. 10. 29. 18:28
한서버에 두개이상의 Tomcat을 띄우면 세션이 꼬이게 된다.
이를 방지하기 위해서 세션쿠키네임을 변경해줘야하는데..
Tomcat6에서는 catalina.sh에 JAVA_OPTS에
SESSION_PARAMETER_NAME
,
SESSION_COOKIE_NAME를 지정할 수 있었으나 Tomcat7에서는 이 옵션이 conf/context.xml에 아래와 같이 지정해줘야 한다.
org.apache.catalina.SESSION_COOKIE_NAME
system property: This has been removed. An equivalent effect can be obtained by configuring thesessionCookieName
attribute for the global context.xml (inCATALINA_BASE/conf/context.xml
).org.apache.catalina.SESSION_PARAMETER_NAME
system property: This has been removed. An equivalent effect can be obtained by configuring thesessionCookieName
attribute for the global context.xml (inCATALINA_BASE/conf/context.xml
).
예를 들면,
<context sessionCookieName
="MY_SESSIONID">와 같이 지정하면 된다.
참고URL:
https://tomcat.apache.org/migration-7.html#Session_cookie_configuration