Breaking down web.xml

I was lurking in javaranch when I bumped into this interesting thread.

http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=7&t=017627

I didn't know you could actually break down your web.xml into smaller pieces. It's annoying when
everything gets bloated up with code...

<?xml versionfiltered="1.0" standalone="no"?>
<!DOCTYPE webapp [
<!ENTITY servlets SYSTEM "servlets.xml">
]>
<webapp>
&servlets;
</webapp>

where servlets.xml has

<servlet>
<servlet-name>blah</servlet-name>
<display-name>blah</display-name>
<servlet-class>blah.blahclass/servlet-class>
</servlet>


An alternative would probably be the Front Controller Pattern which is actually also mentioned in the thread. Read about it, I use it in my app to make everything easy to maintain.
Published 08-22-2006 8:08 PM by lamia