Struts2: Session Problem (after reverse proxy) on Apache Server

Session parameters are stored in a Struts2 session map in action using the SessionAware interface. 
Application's context path is  /MyApp
Use Apache server with an inverse proxy redirect that makes the URL http://www.appdomain.com/ point to local tomcat on localhost:8080/MyApp, Struts2 session handling doesn't work.

 Solution:
Set your ProxyPassReverseCookie path properly":
        ProxyPass / http://localhost:8080/VicWalks/
        ProxyPassReverse / http://localhost:8080/VicWalks/
        ProxyPassReverseCookiePath /VicWalks /
 For more info:
ProxyPassReverseCookiePath directives. See:
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreversecookiedomain

      

Popular posts from this blog

Android: where to run keytool command in android

Can not connect to git using ssh (Permissions 0644 for '/root/.ssh/id_rsa' are too open.

Upload file on Google cloud storage using Java servlet on google app engine