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

      

Comments

Popular posts from this blog

Read Images from a xlsx file using Apache POI

Read Excel using Apache POI - Exception in thread "main" org.apache.poi.poifs.filesystem.OfficeXmlFileException:

Struts 2 : Warning :No configuration found for the specified action: 'Login.action' in namespace: '/'