sse
sse

Reputation: 1151

tomcat server application path problem

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 application name to be included in the url

Thanks

Upvotes: 0

Views: 1450

Answers (3)

Femi
Femi

Reputation: 64700

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.

Upvotes: 0

Prasanna
Prasanna

Reputation: 11544

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.

Upvotes: 0

Mart&#237;n Schonaker
Mart&#237;n Schonaker

Reputation: 7305

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.

Upvotes: 1

Related Questions