aspose file tools
The moose likes Servlets and the fly likes servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply 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
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9189
    
    2

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: 56233
    
  13

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About 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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: servlets