The moose likes XML and Related Technologies and the fly likes Transforming web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Transforming web.xml" Watch "Transforming web.xml" New topic

Transforming web.xml

Jeff Pierce

Joined: Jan 04, 2002
Posts: 13
I want to take an existing web.xml file and transform it directly only changing a single <init-param>/<param-value> in the process and I can't seem to find the best way.

For example, I want to transform the listing value from true to false.

To this:

Jeff Pierce

Joined: Jan 04, 2002
Posts: 13
I should add I only want to change it for servlet "fred", not all the other servlets within the web.xml.
pranav pranav

Joined: Mar 28, 2005
Posts: 9
check this , I am not sure
<xsl:for-each select="//servlet/init-param">
<xsl:variable name="initivalue">
<xsl:value-of select="param-name"/>
<xsl:if test="$initivalue = 'listings'">
<xsl:variable name="paramvalue">
<xsl:value-of select="param-value"/>
<xsl:if test="$paramvalue = 'true'">
Don't get me started about those stupid light bulbs.
subject: Transforming web.xml
Similar Threads
JspException: Failed to obtain specified collection for Struts:optionscollection
Need the techinical help for running sample struts program using Myeclipse5.1.1
An Error Occured while starting tomcat
Deployment descriptor "web.xml" is malformed
implicit object config