Merging content for web.xml during facet install [message #215952] |
Mon, 23 June 2008 17:55 |
Andrew McCulloch Messages: 1 Registered: July 2009 |
Junior Member |
|
|
Hello,
I have a couple of facets that edit web.xml during facet installation.
Instead of hard-coding the required edits the install delegates load a
snippet of web.xml content from disk and merge that content into the
project's web.xml using a custom parser implementation. I would prefer to
drop the use of the custom parser as it doesn't handle the javaee case
where the user did not create a DD during project creation and it is code
I would prefer not to have to maintain.
Is there a way to use the IModelProvider API to merge content from an
external source, or at a minimum create a model from a non-project copy of
a web.xml file and iteratively add content from that model to the
project's model?
For example if I have a facet that needs to install a servlet I would
like to simply include the following content and merge it during facet
installation.
<web-app>
<servlet>
<servlet-name>ServletX</servlet-name>
<servlet-class>MyServlet</servlet-class>
<init-param>
<param-name>key</param-name>
<param-value>value</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ServletX</servlet-name>
<url-pattern>*.xxx</url-pattern>
</servlet-mapping>
</web-app>
Thanks,
Andrew
|
|
|
Powered by
FUDForum. Page generated in 0.01982 seconds