tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Roberts <techi...@ait-web.com>
Subject Re: War files don't work
Date Wed, 23 Jul 2003 19:16:42 GMT
This sounds reasonable to me.
But, if I don't have a <Context/> element in server.xml then how do I provide 
<Context/> type information to Tomcat?


   <!-- NSFS Context -->
   <Context path="/nsfs" docBase="nsfs" debug="0" reloadable="true"
       crossContext="true">
       <Logger className="org.apache.catalina.logger.FileLogger"
           prefix="nsfs_log." suffix=".txt" timestamp="true"/>
   </Context>


BTW,
manually creating the nsfs/ directory did not help.
however; if i manually create the nsfs/ dir and manually unpack the .war file 
everything works fine.

another question:
did I correctly create the nsfs.war file and test it by doing the following?:

1. cd to the webapps/nsfs/ directory
2. jar -cvf nsfs.war *
3. cp nsfs.war ../.  (the webapps dir)
4. rm -rf nsfs/
5. restart tomcat
6. use browser and navigate to http://localhost/nsfs


Thanks,

Rick


John Turner wrote:
> 
> nsfs.war goes in webapps.
> 
> How about just creating the directory and seeing what happens?
> 
> In any case, if you're using WAR files, there's no reason to have a 
> Context defined in server.xml, that's probably what is confusing Tomcat. 
>  Tomcat is reading server.xml, which tells it to start a Context called 
> "nsfs" with a docBase of "nsfs" but no such docBase exists.
> 
> John
> 
> Rick Roberts wrote:
> 
>> Does the nsfs.war file go into webapps directory or into webapps/nsfs 
>> directory?
>> Currently, the webapps/nsfs dir does not exist.  There is only the 
>> nsfs.war file setting in the webapps directory.  I am assuming that 
>> Tomcat will create the webapps/nsfs directory for me when it expands 
>> the war file.
>>
>> I have temporarily set permissions to 777 on the webapps directory and 
>> it still does not expand, nor try to use, the war file.
>>
>>
>> Rick
>>
>> John Turner wrote:
>>
>>>
>>> You've told Tomcat the docBase is "nsfs".
>>>
>>> Tomcat thusly looks for a directory called "nsfs" in the Host's appBase.
>>>
>>> If it finds it, and unpackWars is true, it will unpack your WAR file 
>>> into that directory (webapps/nsfs, NOT webapps).  Thus, Tomcat needs 
>>> r+w on webapps/nsfs.
>>>
>>> Does Tomcat have r+w on webapps/nsfs?
>>>
>>> Alternatively, make unpackWars false.
>>>
>>> John
>>>
>>> Rick Roberts wrote:
>>>
>>>> My directory permissions are as follows:
>>>>
>>>> drwxrwx---    7 root     tomcat4      4096 Jul 23 12:17 webapps
>>>>
>>>> ps -ef shows me this, which is think is Tomcat, which is run by user 
>>>> tomcat4:
>>>>
>>>> tomcat4   6199     1  0 12:17 pts/2    00:00:36 
>>>> /usr/java/jdk1.4/bin/java -Djava.endorsed.dirs= -classpath 
>>>> /usr/java/jdk1.4/lib/tools.jar:/var
>>>>
>>>> Thanks,
>>>>
>>>> Rick
>>>>
>>>> Shapira, Yoav wrote:
>>>>
>>>>> Howdy,
>>>>>
>>>>>
>>>>>>> 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed:
>>>>>>> java.lang.IllegalArgumentException: Document base
>>>>>>> /var/tomcat4/webapps/nsfs does not exist or is not a
>>>>>>> readable directory
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Well explain it to me! :)
>>>>>>
>>>>>> There is a "/var/tomcat4/webapps/nsfs.war" file.
>>>>>>
>>>>>> There should not be a "/var/tomcat4/webapps/nsfs" directory.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> If you have unpackWARS="true" tomcat will try to explode your war into
>>>>> the directory specified as the docBase, which is nsfs under 
>>>>> webapps.  If
>>>>> it can't create this directory or read/write into it, you get the 
>>>>> above
>>>>> error.  Check file permissions on webapps.
>>>>>
>>>>> Yoav Shapira
>>
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

-- 
*******************************************
* Rick Roberts                            *
* Advanced Information Technologies, Inc. *
*******************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message