What is the difference between servlet config and servlet
context.

Answer Posted / ganesh

ServletContext object is used to give the
initparameter(Context) values to each servlet written in a
web appliction
but in servletConfig is used to give initparameter values to
only to specific servlet in which they are mentioned at the
time in web.xml file

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the life cycle of a servlet?

1040


What is difference between GenericServlet and HttpServlet?

726


What do you mean by web applications?

816


Explain url encoding in servlet?

771


What are different ways for authentication of servlet?

705






What's the use of servletcontext?

861


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()?

816


Which httpsession object is used to view and manipulate information about a session?

935


In the servlets, we are having a web page that is invoking servlets ,username and password? which is checks in database? Suppose the second page also if we want to verify

755


What are the different methods involved in the process of session management in servlets?

878


What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

735


List some life cycle methods of a servlet.

766


What is cgi?

762


What is servlet and how it works?

656


Where do you define dispatcherservlet?

721