What is ServletContext() and what is its use?

Answer Posted / shiva

One Servlet Context object will be created by the container
for one webapplication. That means all servlets can have a
scope to acess that context object. for example, let us
assume there 5 servlets are there in u r web application,
if u want to share same data to all servlets then we can
share that data using servlet context, because every
servlet can have interaction with that application
environment...

Is This Answer Correct ?    182 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you run a servlet?

540


What is session tracking?

696


What is servlet container. how it works?

611


Hi frnd can i any one kindly can post for me portlet,hibernate and spring example application and with flow explantion configuration using Jdeveloper.and related links ar tutorials kindly please send me .its urgent for me .thanks in advance...........else can any one send to kondaiah.goddeti@gmail.com

1738


What is the importance of init() method in Servlet ?

592






What is a cookie What is the difference between session and cookie

592


What is url encoding and url decoding

582


How native code can be used in a servlet?

3518


What do you mean by default initialization in java servlet?

604


What is load-on-startup in servlet?

580


Write a simple servlet program to print the contents of html.

547


What is httpservlet class?

540


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

571


What is servlet collaboration?

661


What is the type of method for sending request from http server?

594