Two Laptop Bag*
The moose likes Servlets and the fly likes servlets 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 » Java » Servlets
Bookmark "servlets" Watch "servlets" New topic
Author

servlets

mahender ch
Greenhorn

Joined: Oct 13, 2010
Posts: 1
why we should use <context-param> tag in web.xml file?
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

Nothing to do with Struts, moving to servlets forum.

Mahendrer please check your private messages for some administrative matter. Also go through these guidelines once...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Please be sure to take the time to compose descriptive subjects for your posts. You will attract people who will can give you better and faster answers when your posts have good, descriptive subjects. For more information, please click this link ⇒ UseAMeaningfulSubjectLine.

Using a title of "servlets" in a forum completely dedicated to questions on Servlets isn't going to attract the attention of those who can best help you. You can change your subject line by clicking the button on your post.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Phoenix FireBird
Greenhorn

Joined: Oct 15, 2010
Posts: 3
mahender ch wrote:why we should use <context-param> tag in web.xml file?


I believe I can answer it here: If not, then I apologize

You should be writing <context-param> tag in the web.xml file only and only if you wish to pass some application level data when the application is getting initialized. Whatever parameter data that you are passing through the web.xml file can in turn be accessed by the servlets through the ServletContext object, as and when needed.

Hope that helps.


VERITAS VOS LIBERABIT
(The truth shall set you free)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlets