File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes struts doubts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts doubts" Watch "struts doubts" New topic

struts doubts

p hasini
Ranch Hand

Joined: Oct 24, 2009
Posts: 92

1. Can we change the name of struts.xml file

2. Can we change the name of struts-config.xml file
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2904

Have you tried to change it?, have you looked for the changes need to be done in DD for the same ?

[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
I suppose we can.

But make sure you update the web.xml file too. (struts-config.xml file is mentioned as a <param> parameter to the ActionServlet). So long as you update this location with your change as well, I dont think there should be a problem.
Eswar Nec
Ranch Hand

Joined: May 02, 2010
Posts: 105

For example, you want to change xml file name as: sample-config.xml instead of struts-config.xml

So you must edit web.xml file for following way:

Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2904

Guys, let the OP have some RnD, let him put some thought about how the Struts work. Providing the ready made solution just break the thought process.
I agree. Here's the link:
subject: struts doubts
jQuery in Action, 3rd edition