What is the difference between init-param and context-param?

We can specify both init-param and context-param in web.xml file.

We use init-param to specify the parameters that are specific to a servlet or jsp. This information is confined to the scope of that JSP.

We use context-param to specify the parameters for overall application scope. This information does not change easily. It can be used by all the JSP/Servlet in that Container.

Read the full book at www.amazon.com
Posted in JSP, JSP Interview Questions

Leave a Reply

Your email address will not be published. Required fields are marked *

*