tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Isaacs <Larry.Isa...@sas.com>
Subject RE: Why no default conf/web.xml in TC 3.3 ?
Date Wed, 31 Oct 2001 13:54:31 GMT
It was removed in 3.3 and later versions of 3.2.x (I forget which)
because it encourages web applications to become dependent on
the configuration of the web server for correct operation.
However, for those who are willing to accept this dependence,
having a "default" web.xml can be real convenient.
For Tomcat 3.3.1, I'll see about making the "default" web.xml
a configurable option (disabled by default).

In the meantime, you could uncomment the readDefaultWebXml()
and build your own version of Tomcat.  If you would prefer
not to rebuild the whole Tomcat web server, you could create a
TOMCAT_HOME/lib/container/classes/org/apache/tomcat/facade
directory and put a copy of the WebXmlReader.java source
in that directory.  Rename the file to MyWebXmlReader.java and
update the class name, etc.  Uncomment the readDefaultWebXml()
and compile.  In the conf/modules.xml file, change the
WebXmlReader entry to read:

    <module name="WebXmlReader"
        javaClass="org.apache.tomcat.facade.MyWebXmlReader"/>

Tomcat 3.3 should now use your modified version of WebXmlReader.

Hope that helps.

Larry


> -----Original Message-----
> From: Ivan F. Martinez [mailto:bl@ivanfm.com]
> Sent: Wednesday, October 31, 2001 7:56 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Why no default conf/web.xml in TC 3.3 ?
> 
> 
> I have in my system a default web.xml that works fine in TC 
> 3.2.x, but it dows not work in 3.3
> looking at code the call for readDefaultWebXml() is commented 
> out in WebXmlReader.java
> 
> Without conf/web.xml read I can't make default servlet 
> configurations for all contexts like I do today.
> 
> The comments in code talk about 3.2 version, but this is the 
> source for the 3.3
> ---------------------------------
> 	    // We may read a "default" web.xml from 
> INSTALL/conf/web.xml -
> 	    // the code is commented out right now because we want to
> 	    // consolidate the config in server.xml ( or API calls ),
> 	    // we may put it back for 3.2 if needed.
> 	    // note that web.xml have to be cleaned up - only diff from
> 	    // default should be inside
> 	    // readDefaultWebXml( ctx );
> 	    
> 	    File inf_xml = new File(ctx.getAbsolutePath() +
> 				    "/WEB-INF/web.xml");
> 	    if( inf_xml.exists() )
> 		processWebXmlFile(ctx, inf_xml.getPath() );
> 
> ---------------------------------
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:tomcat-user-help@jakarta.apache.org>
> 

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


Mime
View raw message