See replies inline :
Nandish A wrote:
I think my problem was not clear. I create a war file and
>put it in webapps and also i define a context for the directory which i
>except to be created by the tomcat by extracting the war file. I start
> my tomcat 4.1.12, it craches saying ..\webapps\apps does not exists or is not readable.
Yes, you define a context in server xml but did not create the physical directory for the context. So tomcat quits before it gets to the business of unpacking your wars, so no directory for you. If you didn't create a context(and directory in webapps) in the first place I'm preeety sure that the war file will be unpacked.


It is possible for you to define your own context outside of server.xml as is done with the admin web application. Just put the war file in the webapp directory along with its own xml file which defines its context.

I want to know
1) is it possible to put the war file with out extracting it and defining teh context. Use it like "http:\\<name>:8080\apps\Welcome.jsp"
2)If 1 cannot be done how do i use war file.(i dont want to extract it myself and define the context myself) i want to put the war file, define context and use it

Yes you can. Look here http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html

-----Original Message-----
From: Peng Tuck Kwok [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, February 19, 2003 10:05 AM
To: Tomcat Users List
Subject: Re: WAR FILE NOT WORKING

If you have already defined a context in server.xml before a war file is created, then the directory for that context should exist. Otherwise if you run tomcat from the command line it will just quit. Try this :
remove the reference to the context called apps from your server.xml and remove (or move somewhere else) the apps directory under webapps. Place the war file you want in the webapps directory, start (restart if you are currently running) tomcat. They war file should deploy itself.

You can test the war file unpacking behaviour by downloading a few examples on your own.


Nandish A wrote:

Hi Jake(Hope i can call you this way), Thanks for your help, but (as usually) things work if extract myself. If i have to extract it myself then the purpose of the war file is not solved(as far as i am concerned). I would like to give the war file to my customer and the configuration of server.xml file, and i except it should extract and work fine. Jake i did not understand what is minus the ".war".

Thanks and regards
Nandish

Second, if you configure this in server.xml and then expect a .war of the name apps.war to be extracted to a directory of the same name (minus the ".war"), you are mistaken. You will need to shut down Tomcat and unpack this yourself first. If you didn't configure anything in server.xml, then it would be unpacked like you expect. It is all in Tomcat's documentation. Don't feel alone on this one, though. A lot of people have had this confusion and the behavior is somewhat of a contentious issue. However, now that you know it works this way (whether we like it or not), you can work around it.

Jake

At 04:13 PM 2/18/2003 +0530, you wrote:


hi all i am using tomcat 4.1.17 windows 95. i tested my application keeping it in a directory "apps" on desktop and configuring the server.xml file. No when i create the war file of the directory
and place it in webapps when i restart my server the apps.war is not getting extracted and teh server crashes. i used
<Context path="\" docBase="/apps" appBase="webapps" debug="0" reloadable="true" crossContext="true" privileged="true">

any help any idea any opinion would be great
Regards
Nandish
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to