ServletConfig is just only a object created by container itself.When servlet is loaded on the server at that time container make the servletconfig object by which you can simply do any required change in Web.xml file directly without disturbing any specific servlet.
All the configurations can directly change by manipulating in a web.xml file there is no need to modifications in relevant servlet class file.
ServletConfig is a interface actually who's object is created by container. by using that object we can do various changes in a servlet files without even touching that servlet file.
There are 4 methods available in this interface as:
1 > getInitParameter();
2 > getInitParameterNames();
3 > getServletName();
4 > getServletContext();
Keen to design and develop web apps by leveraging various java based technologies and tools like springboot,microservices,docker,kubernetes,spring security,thymeleaf,jakarta,spring cloud, java 8.
Comments
Post a Comment