File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes two same paths in different configuration files - Which one will load? 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 » Frameworks » Struts
Bookmark "two same paths in different configuration files - Which one will load?" Watch "two same paths in different configuration files - Which one will load?" New topic
Author

two same paths in different configuration files - Which one will load?

Prakash Mani - Attur
Ranch Hand

Joined: Oct 08, 2009
Posts: 100
I have the following in my struts-config.xml file.



and

I have the following in struts-config2.xml file.



Here is my problem:

When i click on the url "/user.do" the UserAction2 is loading also the path in both config files are same( actually thats the action i want to load). But when i comment the action and form-bean elements in the struts-config.xml its showing "Cannot find ActionMapping or ActionMapping collections". The action part in the struts-config.xml is not needed actually when it is not loading right? thats why i have commented that.

Doubt 1: why the first action part is not loading?
Doubt 2: when i comment the unloaded action part why its showing error?


Please reply.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read. You can edit your post by using the button.

I'm not really sure what you're asking, though.
akshit kumar
Greenhorn

Joined: Jul 03, 2006
Posts: 13
check your WEB-INF.XML what is the configuration file you are specifying
struts-config.xml file. or struts-config2.xml file or are you using "switch action"
may be some problem with that
Please re-phrase the question.

cheers


Looking for new ideas if you don't get one steal one . SCJP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: two same paths in different configuration files - Which one will load?
 
Similar Threads
The request sent by the client was syntactically incorrect ??
DispatchAction and Validator
Problem reg. Delete Operation in my struts application
Forward Problem in Struts
template:insert problem/issue....