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

How can the session in servlet be destroyed?

648


What is servlet and how it works?

508


What are the various ways of session supervision in servlets?

525


Can servlet have a constructor ?

599


What is api in servlet?

529






What do you mean by cgi and what are its drawbacks?

533


What is the directory structure of a war file?

715


Why servlet is faster than jsp?

570


What are the differences between the servletconfig interface and the servletcontext interface?

587


What is the main purpose of java servlets?

587


Is it good idea to create servlet constructor?

747


What are the types of Session Tracking ?

650


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 ?

614


Difference between GET and POST?

714


How can you push data from an Applet to a Servlet?

611