问题
I am using tomcat in JWS 3-1. I have application war "myapp.war" in
/opt/webserver/webapps
Now my url is domain.com/myapp I want domain.com to also redirect to myapp
I was trying to follow the following link. Tomcat base URL redirection.
There is no ROOT folder in /opt/webserver/webapps.
It doesn't seem to work.
Can anyone suggest I should look in which direction?
回答1:
If there is no separate Root folder then can deploy a ROOT.war in parallel to the application war. In Root.war we can add an index.jsp which will forward to application as per the Tomcat base URL redirection.
来源:https://stackoverflow.com/questions/62742706/open-shift-jws-tomcat-8-redirect-base-url-to-application-war