0

Can anyone suggest to me where I have to put the context path in a Tomcat server? Do I have to put it in context.xml or do I have to create a new .xml inside this apache-tomcat-6.0.18\conf\Catalina\localhost?

When I type the URL http://localhost:9796/ this should redirect me to the login page. But I am getting 404 exception. Any suggestions would be really helpful.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

1 Answers1

1

You can define the context root information in Server.xml, for all the web modules(WAR) deployed in a server.

  1. If you are deploying the application directly from the tomcat server by copying the WAR directly into webapps folder you can add the context's information in server.xml.
  2. If you are deploying the app in Eclipse then you need to create a context.xml in the META-INF folder and add the entry like below
<Context crossContext="true" docBase="{urModuleName}" path="/{URL}"
reloadable="true">
Murugesh
  • 1,009
  • 1
  • 12
  • 34