What is the Difference Between init-param and context-param in JSP ?

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.



You May Interest

What is the Main Difference Between a Session and Cookie in JSP ?

What is an EnumSet in Java ?

What is the Difference Between Expression and Scriptlet in JSP ?

What is the Difference Between Abstract Class and Interface in Ja ...

What are the Situations in Which You Choose HashSet or TreeSet in ...