Skip to main content

Webmodule with multiple web.xml

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
aldaris
Offline
Joined: 2009-07-22

Hi,

I have a big project, and I would like to create small modules from it
in a way where adding a new jar to WEB-INF/lib would mean, that the
web.xml inside of that jar will be loaded, and that would also mean,
that the jar can add new servlets, filters, listeners, etc. If I
understand correctly web-fragment.xml's are doing something like this,
my question is can this be done somehow with Java EE 5?

Thanks,
Peter

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
swchan2
Offline
Joined: 2005-03-29

Yes, web-fragment will achieve what you want to do.
You need Servlet 3.0 in Java EE 6.
Shing Wai Chan

On 12/19/2010 2:27 PM, Major Péter wrote:
> Hi,
>
> I have a big project, and I would like to create small modules from it
> in a way where adding a new jar to WEB-INF/lib would mean, that the
> web.xml inside of that jar will be loaded, and that would also mean,
> that the jar can add new servlets, filters, listeners, etc. If I
> understand correctly web-fragment.xml's are doing something like this,
> my question is can this be done somehow with Java EE 5?
>
> Thanks,
> Peter