i use tomcat 6 for production. i have a web app deployed on this server called: app.war it has a url : test.org.
every time when i undeploy app.war and redeploy it this path won't work any more http://test.org/home
but this url always work: http://test.org/app/home.
to make the first url work, i need to restart the tomcat server.
i wonder why when i redeploy the app.war the url http://test.org/home does not work.
if there a way to make it always work without restarting the server? i don't want the ap开发者_运维百科plication name to be included in the url
Thanks
This has no simple answer, as there are many components involved. You should isolate the problem. For instance, you could start removing test.org domain mapping, ensuring that there's no component possibly caching the output and so on.
And then after you had isolated Tomcat from anything else, if the problem persist, you could state that this is a Tomcat problem.
So please (pleeeeeeease) refine your question when you have done a couple of these steps so the SO community can help you.
Sorry for the long response.
Check out your app.xml in ${TOMCAT_HOME}/conf/Catalina/localhost . Whe you try to redeploy this file might get deleted and gets recreated causing you the problem.
In your war file try creating a folder META-INF at the top level (in the same directory as WEB-INF) and creating a file context.xml
in the META-INF folder. In context.xml
put this:
<Context path="" reloadable="true">
</Context>
See if that works for you.
精彩评论