What is ServletContext() and what is its use?

Answer Posted / srikanth

ServletContext is called web application there would be one servlet context for entire web applicationthe .servlet context is used to get the context parameters specified in web.xml and also get the information of servlet engineand also request dispatcher object.

Is This Answer Correct ?    15 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the war file?

687


hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code

2380


What are different Authentication options available in Servlets.

657


How can we perform any action at the time of deploying the project?

722


What are different ways for servlet authentication?

644






What are the life cycle methods of the servlet?

677


What is the purpose of inter-servlet communication?

679


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

644


Explain the differences between jsp and servlet.

623


What is the difference in between the httpservlet and generic servlet?

695


What is pure servlet?

782


How do you load an image in a Servlet?

758


What is servlet collaboration?

748


What is the default http method in the servlet?

871


What are sessions in servlets?

672