wood burning stoves*
The moose likes Struts and the fly likes <param-value> tag in web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "<param-value> tag in web.xml" Watch "<param-value> tag in web.xml" New topic

<param-value> tag in web.xml

Amirtharaj Chinnaraj
Ranch Hand

Joined: Sep 28, 2006
Posts: 236

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>
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
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30057

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

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
I agree. Here's the link: http://aspose.com/file-tools
subject: <param-value> tag in web.xml
Similar Threads
Struts 1.3.5 -- Module 'null' not found. Null Pointer Exception
The method doMarkDoneOutboundCall(null, String) is undefined for the type Done_jsp
Combining two different struts modules of a big application
Multiple Struts-config.xml in Jboss 4.2.1
let's discuss to implementing multiple controllers by using struts1.0