What is the difference between servlet config and servlet
context.

Answer Posted / sulthansheriff

Servlet Context :
In servlet programming, the servlet context is the
environment where the servlet runs. The servlet container
creates a ServletContext object that you can use to access
information about the servlet's environment.

ServletConfig:
A servlet configuration object used by a servlet container
used to pass information to a servlet during initialization.

Is This Answer Correct ?    89 Yes 27 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is tomcat a servlet container?

751


What is the directory structure of a war file?

883


Why is init() method is used in servlets?

710


What is servlet looping or chaining?

871


What's the use of servletcontext?

859






What are the steps that are required to handle the multi-threading?

810


What are all the ways for session tracking?

794


What is the difference between Server and Container?

826


Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?

812


A client sends requests to two different web components. Both of the components access the session. Will they end up using the same session object or different session ?

797


What are the jobs performed by servlets?

753


What is a servlet?

803


Explain the differences between jsp and servlet.

698


What are the functions of an intercepting filter?

686


What are the different methods of session management in servlets?

713