Tag: ServletContext
Understanding ServletConfig and ServletContext
In our servlet application development, some of the programmers will write fixed coding , with in the servlet, which is not recommended. For example, if we write database related code in our servlet, in future if…
Example of ServletContext in Java
ServletContext is one of pre-defined interface available in javax.servlet.*; Object of ServletContext interface is available one per web application. An object of ServletContext is automatically created by the container when the web application is deployed. Assume there exist a…
Difference between ServletConfig and ServletContext in Java
Let us see the main differences between ServletConfig and ServletContext, which is very popular interview question as well 🙂 ServletConfig ServletConfig available in javax.servlet.*; package ServletConfig object is one per servlet class Object of ServletConfig will be created during…