You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Milo Hyson <mi...@cyberlifelabs.com> on 2002/08/19 23:36:25 UTC
Managing a large web.xml
Is there any way to break up a large web.xml file into smaller ones to make it
more manageable? I've found that it doesn't take that big of a project before
I have so many servlets and mappings as to make the deployment descriptor
file quite long. I've read through the Servlet spec (2.3) and poked around in
the mailing list archives, but can't find anything like an include directive
or anything else that might let me divide my descriptor into mutiple smaller
files. Ideally, I'd like to be able to create a different file for each
section of the application, so that I can focus on one at a time.
I'd appreciate any insights into this situation. Thanks in advance.
--
Milo Hyson
CyberLife Labs, LLC
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Managing a large web.xml
Posted by Bill Barker <re...@verizon.net>.
The obvious answer is to use internal entities (Note: some versions of
Tomcat don't handle these gracefully, but I believe [but I don't use], that
4.0.4 and 4.1.x do). The idea is to setup in web.xml:
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd"
[
<!ENTITY section1 SYSTEM "/home/tomcat/part1.xml">
<!ENTITY section2 SYSTEM "/home/tomcat/part2.xml">
]
>
<web-app>
......
§ion1;
.....
§ion2;
.....
</web-app>
"Milo Hyson" <mi...@cyberlifelabs.com> wrote in message
news:200208191436.25161@cyberlifelabs.com...
> Is there any way to break up a large web.xml file into smaller ones to
make it
> more manageable? I've found that it doesn't take that big of a project
before
> I have so many servlets and mappings as to make the deployment descriptor
> file quite long. I've read through the Servlet spec (2.3) and poked around
in
> the mailing list archives, but can't find anything like an include
directive
> or anything else that might let me divide my descriptor into mutiple
smaller
> files. Ideally, I'd like to be able to create a different file for each
> section of the application, so that I can focus on one at a time.
>
> I'd appreciate any insights into this situation. Thanks in advance.
>
> --
> Milo Hyson
> CyberLife Labs, LLC
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Managing a large web.xml
Posted by Will Hartung <wi...@msoft.com>.
From: "Milo Hyson" <mi...@cyberlifelabs.com>
Sent: Monday, August 19, 2002 2:36 PM
> Is there any way to break up a large web.xml file into smaller ones to
make it
> more manageable? I've found that it doesn't take that big of a project
before
> I have so many servlets and mappings as to make the deployment descriptor
> file quite long. I've read through the Servlet spec (2.3) and poked around
in
> the mailing list archives, but can't find anything like an include
directive
> or anything else that might let me divide my descriptor into mutiple
smaller
> files. Ideally, I'd like to be able to create a different file for each
> section of the application, so that I can focus on one at a time.
>
> I'd appreciate any insights into this situation. Thanks in advance.
The Servlet spec isn't much help in this case.
The most practical approach is to break it up using some regular method, and
then just create the actual web.xml as part of the build/deploy process in
your build script. (For example, just before you pack everything up in a
WAR, or whatever).
I don't have any code to share with you at the moment, and I don't think
it's quite straightforward with ANT, but that's still the path I'd take.
Regards,
Will Hartung
(willh@msoft.com)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>