Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Merging content for web.xml during facet install
Merging content for web.xml during facet install [message #215952] Mon, 23 June 2008 17:55
Andrew McCulloch is currently offline Andrew McCullochFriend
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
Previous Topic:Eclipse not finding classes.
Next Topic:Service Endpoint disappears when starting new service
Goto Forum:
  


Current Time: Mon Nov 24 07:01:35 GMT 2014

Powered by FUDForum. Page generated in 0.02603 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software