Re: web.xml location

2000-11-10 Thread Wyn Easton

The directory structure is predetermined for web applications.
You might want to check out the Servlet spec.  Your web.xml must be in
the Web-inf directory.

--- Jim Richards [EMAIL PROTECTED] wrote:
 
 If I start tomcat with a different server.xml using the -f command
 line
 argument, where does the web.xml file reside? I'm trying
 to make my installation of tomcat no depend on anything in the
 $TOMCAT_HOME/conf directory (so all my conf stuff can live in one
 place, eg. Apache/Cocoon/Tomcat, etc)
 
 I can't seem to find a way to set it, nor a way to determine if it's
 missing ...
 
 
 --
 Kumera - a new Open Source Content Management System
 for small to medium web sites written in Perl and using XML
 http://www.cyber4.org/kumera/index.html


=
Wyn Easton
[EMAIL PROTECTED]

__
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/



Re: web.xml location

2000-11-10 Thread Jim Richards

At 03:43 AM 10/11/00 -0800, you wrote:
The directory structure is predetermined for web applications.
You might want to check out the Servlet spec.  Your web.xml must be in
the Web-inf directory.

I didn't mean the web.xml that is stored in the .war file or the WEB-INF directory
but the default one that lives in $TOMCAT_HOME/conf. There is an Interceptor
that loads this file, from a default location conf/web.xml and it seems that
in the server.xml I can specify a new home, but I don't know the XML syntax
for the name/attribute pair.



--
Kumera - a new Open Source Content Management System
for small to medium web sites written in Perl and using XML
http://www.cyber4.org/kumera/index.html



RE: web.xml location

2000-11-10 Thread Kitching Simon

Hi Jim,

[[ Everybody **PLEASE** specify your tomcat version in your questions ]] 

I guess you aren't talking tomcat4, because you mention Interceptor.

If you are talking tomcat3.2, then there *isn't* a global web.xml file
anymore
(actually, it still exists in the downloaded code, but is ignored).

I use tomcat3.2 currently, and put this in server.xml:
ContextManager
  debug="0"
  workDir="/home/skitchin/webserver/tomcat/work"
  showDebugInfo="true"
  home="/home/skitchin/webserver/tomcat" 

I put this server.xml in ="/home/skitchin/webserver/tomcat/conf,
and use the -f option to get tomcat to read it.

I had to specify a full path for workDir (it didn't seem to
take it relative to the home attribute) but all else works
as expected.

For tomcat3.1, I expect that the above would work, and that
web.xml would be read from the specified home directory, 
but haven't tried it myself :-)

Cheers,

Simon

 -Original Message-
 From: Jim Richards [SMTP:[EMAIL PROTECTED]]
 Sent: Friday, November 10, 2000 1:13 PM
 To:   [EMAIL PROTECTED]
 Subject:  Re: web.xml location
 
 At 03:43 AM 10/11/00 -0800, you wrote:
 The directory structure is predetermined for web applications.
 You might want to check out the Servlet spec.  Your web.xml must be in
 the Web-inf directory.
 
 I didn't mean the web.xml that is stored in the .war file or the WEB-INF
 directory
 but the default one that lives in $TOMCAT_HOME/conf. There is an
 Interceptor
 that loads this file, from a default location conf/web.xml and it seems
 that
 in the server.xml I can specify a new home, but I don't know the XML
 syntax
 for the name/attribute pair.
 
 
 
 --
 Kumera - a new Open Source Content Management System
 for small to medium web sites written in Perl and using XML
 http://www.cyber4.org/kumera/index.html



RE: web.xml location

2000-11-10 Thread Jim Richards


[[ Everybody **PLEASE** specify your tomcat version in your questions ]] 

Sorry, version 3.2b6.

If you are talking tomcat3.2, then there *isn't* a global web.xml file
anymore (actually, it still exists in the downloaded code, but is ignored).

I found that it is loaded in from the

ContextInterceptor className="org.apache.tomcat.context.WebXmlReader" /

and it looks in the $TOMCAT_HOME/conf directory. If I move home, then other
things will break (i.e. no webapps directory) as I use virtual hosts for all the
development work that I do.


--
Kumera - a new Open Source Content Management System
for small to medium web sites written in Perl and using XML
http://www.cyber4.org/kumera/index.html



Re: web.xml location

2000-11-10 Thread Craig R. McClanahan

Jim Richards wrote:

 [[ Everybody **PLEASE** specify your tomcat version in your questions ]]

 Sorry, version 3.2b6.

 If you are talking tomcat3.2, then there *isn't* a global web.xml file
 anymore (actually, it still exists in the downloaded code, but is ignored).

 I found that it is loaded in from the

 ContextInterceptor className="org.apache.tomcat.context.WebXmlReader" /

 and it looks in the $TOMCAT_HOME/conf directory. If I move home, then other
 things will break (i.e. no webapps directory) as I use virtual hosts for all the
 development work that I do.


The call to the method that reads the "global" defaults -- readDefaultWebXml() -- is
currently commented out.

I am really hesitant to uncomment it this close to a release, for fear of unintended
consequences.  However, people who want to download the source and experiment are
welcome to try uncommenting this and reporting their success or failure.  It is line
104 of the org.apache.tomcat.context.WebXmlReader class.

Craig McClanahan