I run a Spring App on a remote server where is installed a Tomcat Server which give access to my app via https://mydom.com:8080/myapp.
To make my app accessible via https://mydom.com, I installed Apache and configured as reverse proxy.
This is configuration:
<VirtualHost _default_:443>
SSLEngine On
SSLCertificateFile /opt/ssl/mydom_com.crt
SSLCertificateKeyFile /opt/ssl/mydom_com.key
SSLCertificateChainFile /opt/ssl/mydom_com.ca-bundle
BrowserMatch ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
ServerName mydom.com
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080/myapp/
ProxyPassReverse / http://127.0.0.1:8080/myapp/
ProxyPassReverseCookiePath /myapp /
</VirtualHost>
Now, I try to use ${pageContext.request.contextPath} in my jsp files to get the right links and resources path.
When I run from IDE it return /myapp, which is good.
When run on mydom.com it return /myapp, which is not good. I need to get an empty string or /.
How I can configure to get right value for ${pageContext.request.contextPath}?
mydom.com?https://mydom.com:8080/myapp. But I have done that with apache. My problem is at${pageContext.request.contextPath}. Onmydom.comit returns/myappwhich iscontextPathfrom tomcat:https://mydom.com:8080/myapp. Onmydom.comI want${pageContext.request.contextPath}to be equal with'/'or''(empty string).