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 are the ways to handle multi-threading in servlets?

607


what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?

580


Explain web application directory arrangement?

597


Which event is fired at the time of setting, getting or removing attribute from application scope?

626


What is cgi and what are its drawbacks?

560






Explain in brief the directory structure of a web application?

579


Why jsp is better than servlet?

541


Describe the phases of servlet lifecycle?

638


Define the life cycle of a servlets.

582


explain the advantages of servlet life cycle?

566


How to notify an object in session when session is invalidated or timed-out?

642


What is called servlet container?

671


Can a jsp be called using a servlet?

590


When servlet object is created?

613


If my browser does not support cookie, and my server sends a cookie instance what will happen?

659