gudii9
asked on
servlet init param and contect param
Hi,
I am reading below link on servlets.
http://tutorials.jenkov.com/java-servlets/web-xml.html
Waht are the cases or scenarios we need to pass init-param, context params to a servlet. I am not clear on that concept which was being used even in spring framework also.
How to know if to pass single servlet or to all servlets?
Please advise
I am reading below link on servlets.
http://tutorials.jenkov.com/java-servlets/web-xml.html
Waht are the cases or scenarios we need to pass init-param, context params to a servlet. I am not clear on that concept which was being used even in spring framework also.
How to know if to pass single servlet or to all servlets?
Please advise
ASKER
What are practically examples where we use both?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
init params are used by servlets to initialise themselves in the init() method.
Context params are used to set parameters on the entire web application so any servlet can access them.