• 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

<param-value> tag in web.xml

 
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Hi All,

Iam working in a maintenance project. Their i found the following servlet tag in the web.xml, In the servlet tag is mentioned as below



here iam not able to understand what the <param-value>.*[\\/]struts-config.*.xml$</param-value>
</init-param>
represents. is it a regular Expression, if so then any please explain how this expression works

so to understand how it behaves i tried to build a small web-application using Tomcat 7 , iam getting FIleNotFoundException
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
com.struts.action.TestActionServlet looks like a servlet someone at your company wrote. Check the source code for what it does. It's not a good package name for what it is worth unless you work for a company called Struts.

You are correct that the value is a regular expression. Diagramming it, we have:
.* - zero or more of any characters
[\\/] - slash or backslash
struts-config.*.xml - wildcard for files beginning with struts config that are xml
$ - end of string

In other words, it finds struts config files with anything extra in the name like struts-config.qa.xml
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic