Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

context path in Tomcat 5.5

 
ManiRaj Raj
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to set the context path in Tomcat5.5?
In Tomcat4.1 we set path in server.xml But here i couldn't find
context path in server.xml.
Please help me
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here you go mate -
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
 
Satyam Jaiswal
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need to go in "C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina\localhost" or where ever your "\conf\Catalina\localhost" and make a APPName.xml file, APPName may be anything. Content of the application would be
<Context path="/APPName" docBase=" path of the code" >
</Context>
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
APPName may be anything.

Actually, I think that APPName has to be the name of an existing application.
 
Mav Ricky
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
even it could be like this as well

<Context path="/" docBase=" path of the code" >
</Context>
 
Salvador Cecilio
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So how is Tomcat able to map out the location of the "jsp-examples" and "servlets-examples"?

I can't find their context tags in any of the tomcat xml files.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So how is Tomcat able to map out the location of the "jsp-examples" and "servlets-examples"?


There is a built in convention that if a directory under webapps has a WEB-INF subdirectory and there is a correctly formatted web.xml there, then that directory is a web application. All according to the servlet API.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic