aspose file tools*
The moose likes Struts and the fly likes Can I use web.xml in struts app for storing some param values? 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 "Can I use web.xml in struts app for storing some param values?" Watch "Can I use web.xml in struts app for storing some param values?" New topic
Author

Can I use web.xml in struts app for storing some param values?

Pras Tiwari
Ranch Hand

Joined: Nov 07, 2005
Posts: 186
Hi,
I am using Struts for My web Development. Now can I use my Web.xml file for storing value of some application specific parameters(Like image upload directory path, etc). If yes, how to do that? Should I use <init-param>?
& also Later how can I refer values of these parameters into my application files?
Please help me.
Thank you.
Pras


********Deserve Before You Desire********
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'd suggest using servlet context parameters. You define them like this:


and retreive them in your action class like this:



Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can I use web.xml in struts app for storing some param values?