File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Pras Tiwari
Ranch Hand
Posts: 186
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd suggest using servlet context parameters. You define them like this:


and retreive them in your action class like this:

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic