context-param

init-param vs context-param Servlets

Before going into init-param vs context-param, let us know the meaning and purpose of init-param and context-param in Servlet coding. 1. What is <init-param>? portnumber 8888 We have seen the above code in Servlet web xml init param Example using ServletConfig where the "portnumber" and "8888" are accessible for the particular servlet "ReadInitParamValues". Other servlets …

init-param vs context-param Servlets Read More »

ServletContext Example context-param

Before going ServletContext Example, see the difference between <init-param> and <context-param>, both written in web.xml file. What is <init-param>? portnumber 8888 We have seen the above code in Servlet web xml init param Example using ServletConfig where the "portnumber" and "8888" are accessible for the particular servlet "ReadInitParamValues". Other servlets in the container cannot access …

ServletContext Example context-param Read More »