Reputation: 293
When I deploy my app in dev environment it works fine. When I try to deploy it on production environment, Tomcat gives additional path parameter which cause problems in my app.
Example: localhost:port/home.html -> localhost:port/AppName/home.html
Same goes to static resources eg. My Image is located at adress: localhost:port/static/index.jpg and on production env I need to put localhost:port/AppName/static/index.jpg
Is there any Spring configuration that helps to aovid that? Do you know any solutions for this problem?
Upvotes: 1
Views: 928
Reputation: 1812
Simple solution without changing your server configuration.delete ROOT.war from your server and paste your war here rename it as ROOT.war.
Second solution is find your server.xml. add context here
<Context path="/" docBase="your application name here" reloadable="true" />
don't forget path="/". And change if existing source has the path "/" to something else so it will not conflict.
Upvotes: 1
Reputation: 195
It seems other people have already ask themselves the same question. These answers may help you (You just need to name you app as root.war):
Upvotes: 0