Actually in mvc which separates the controller from the view and the model Is it the web container or any other thing? I need explanation. Will anybody help?
I've another doubt how to call servlet context inside service/doget/dopost methods after calling init method without passing servletconfig as a parameter inside init method
what do you mean by after calling init(). you are not going to call init() anywhere, is it clear?
i hope it will clear your concept.
The servlet context is initialized when the Web application is loaded, and is contained in the ServletConfig object that is passed to the init() method. Servlets implementing the GenericServlet interface (directly or indirectly) can invoke the getServletContext() method to get the context reference, because GenericServlet implements the ServletConfig interface.
Originally posted by srinivasan doraiswamy: calling init method without passing servletconfig as a parameter inside init method
you must know this about init()
The container initializes the servlet by invoking its init() method, passing an object implementing the ServletConfig interface. In the init() method, the servlet can read configuration parameters from the deployment descriptor or perform any other one-time activities, so the init() method is invoked once and only once by the servlet container.
Post by:autobot
I’m tired of walking, and will rest for a minute and grow some wheels. This is the promise of this tiny ad:
a bit of art, as a gift, that will fit in a stocking