aspose file tools*
The moose likes Struts and the fly likes RE-POST: How to read the details of already parsed struts-config Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "RE-POST: How to read the details of already parsed struts-config" Watch "RE-POST: How to read the details of already parsed struts-config" New topic
Author

RE-POST: How to read the details of already parsed struts-config

Indresh Chadha
Greenhorn

Joined: Oct 15, 2008
Posts: 4
Hi,

The ActionServlet whilie initializing, parses the configuration files i.e struts-config.xml and stores the corresponding parsed data. If in my application I want to access those objects created by the Digester parser, how can I do that? For example, I want to read all the attributes of an Action tag: path, input, name, scope, etc.

I was able to figure out that the ActionConfig class stores all the attributes for any Action. Now in my application, if I need to access the ActionConfig object, how can I do that? Is there any method in the ActionServlet class which I can use?

Can anyone share some piece of code for the same?

Thanks,
Indresh
Tom Rispoli
Ranch Hand

Joined: Aug 29, 2008
Posts: 349
I think its something like this:



Might be different depending on your version of struts.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RE-POST: How to read the details of already parsed struts-config