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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
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: 14687
    
  16

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: 12675
    
    5
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://aspose.com/file-tools
 
subject: context path in Tomcat 5.5
 
Similar Threads
web application url
Forms delete part of the URL
Can't run JSP
Tomcat and HTTp Status 404 for JSP testing
not making the JSP pages visible using tomcat server