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:[EMAIL PROTECTED]]
> Sent: Wednesday, October 31, 2001 7:56 AM
> To: [EMAIL PROTECTED]
> 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:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

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

Reply via email to