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 steps that are involved in using the httpservlet class?

563


What is the use of servletconfig interface?

548


What do you mean by annotations in servlet?

574


What are the uses of servlet and what is servlet chaining?

551


How can we refresh automatically when new data has entered the database?

608






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

608


What is URL Encoding?

609


explain the advantages of servlet life cycle?

544


What is a generic servlet?

511


Can you create a deadlock condition on a servlet?

580


What is the difference between Servlet Request and Servlet Context when calling a Request Dispatcher?

592


Explain the war file?

598


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

564


Explain the differences between jsp and servlet.

530


Can we override destroy method in servlet?

489