*
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
Author

Transforming web.xml

Jeff Pierce
Greenhorn

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
Greenhorn

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
Greenhorn

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:variable>
<xsl:if test="$initivalue = 'listings'">
<xsl:variable name="paramvalue">
<xsl:value-of select="param-value"/>
</xsl:variable>
<xsl:if test="$paramvalue = 'true'">
<param-value>false</param-value>
</xsl:if>
</xsl:if>
</xsl:for-each>
 
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