• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Transforming web.xml

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I should add I only want to change it for servlet "fred", not all the other servlets within the web.xml.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic