How to add context path in tomcat5.5...

Hi.developers.

I am new to tomcat5.5. before i am using tomcat4.1,jdk1.5...it's all working well. Now i want to change in to tomcat5.5. My problem is in tomcat4.1 i am doing all projects. i have done creation of war files and write path in server.xml file like this

<Context path="/webtest" docBase="webtest" debug="0" reloadable="true" />

it's working well in tomcat4.1. I don't know where it is write this path in tomcat5.5. Please help me on this topic.

thanking you,

with regards

sure...:)-

[547 byte] By [sure_2912a] at [2007-10-3 7:44:43]
# 1

as far as i know, if you are using war files you don't even need the context path....i use a host tag instead:

<host name="www.domain.com" appBase="/path/to/war" unpackWARs="true" autoDeploy="true" />

dropping war files in /path/to/war they auto extract themselves and are reachable via http://www.domain.com/context.

gl, hope that helps.

ggenglisha at 2007-7-15 2:46:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
I seem to recall that Tomcat 5.5 had the notion of a Context.xml that was stored in the META-INF directory of the WAR. I know that I had to define Context-specific JNDI resources in Tomcat 5.5 through this file.Brian
brian@cubik.caa at 2007-7-15 2:46:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Hi..sir. Thanks for your reply. If i don't give context path in tomcat5.5 then 404 error comes out. Even it is happen in 4.1. Please guide me how to solve this problem.Thanking uwith regardssure...:)-
sure_2912a at 2007-7-15 2:46:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

you need to give more information for us to help you...for all we know you are typing stuff in wrong. copy your config lines, copy the path where you placed the information and then copy the url you are going to in order to hit it.

if you want to start from ground zero and you have a war file drop it in $TOMCAT_HOME/webapps when tomcat has started.Wait a few seconds...if the war file doesn't self extract into a folder of the same name then something is wrong. If it does then go here:

http://<ip.of.tomcat>:8080/<warfilename>

the war file name is your contextroot....if you have jsps in that folder you shouldn't get any 404s.

gl, hope that helps.

ggenglisha at 2007-7-15 2:46:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
You can add a context path by adding an xml file that specifies your context to %CATALINA_HOME%/conf/Catalina/localhost directory. You will find there admin.xml and manager.xml that you can use as example.
kolkama at 2007-7-15 2:46:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...