aspose file tools
The moose likes Tomcat and the fly likes context path in Tomcat 5.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "context path in Tomcat 5.5" Watch "context path in Tomcat 5.5" New topic
Author

context path in Tomcat 5.5

ManiRaj Raj
Greenhorn

Joined: May 10, 2006
Posts: 1
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

Joined: Feb 02, 2002
Posts: 1211

Here you go mate -
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html


The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
Satyam Jaiswal
Greenhorn

Joined: May 23, 2006
Posts: 6
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>


Thank You
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14672
    
  11

APPName may be anything.

Actually, I think that APPName has to be the name of an existing application.


[My Blog]
All roads lead to JavaRanch
Mav Ricky
Ranch Hand

Joined: May 19, 2004
Posts: 76
even it could be like this as well

<Context path="/" docBase=" path of the code" >
</Context>
Salvador Cecilio
Ranch Hand

Joined: Dec 20, 2004
Posts: 41
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.


SCJP 1.4 - 93%
SCWCD 1.4 - 89%
IBM FileNet 3.5 - Developer
IBM FileNet 3.5 - Administrator
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12268
    
    1
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


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: context path in Tomcat 5.5
 
Similar Threads
Forms delete part of the URL
Tomcat and HTTp Status 404 for JSP testing
Can't run JSP
not making the JSP pages visible using tomcat server
web application url