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

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

622


Differentiate between the print writer and servlet output stream?

554


What is pure servlet?

691


What is the purpose of inter-servlet communication?

583


What is difference between jsp and servlet?

633






Write a servlet to upload file on server.

591


How we can call a jsp from the servlet?

520


Which java application server is the best?

540


How the JSP file will be executed on the Server side?

636


What must be implemented by all servlets?

562


What is http servlet? Explain with the help of an example.

574


What are the differences between forward() method and sendredirect() methods?

538


Define declaration.

608


What is called Session Tracking?

589


What do you mean by interservlet communication?

576