Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is difference between servletconfig and servletcontext?

Answers were Sorted based on User's Feedback



what is difference between servletconfig and servletcontext?..

Answer / p.nandakishore

ServletConfig and ServletContext are interfaces in
javax.servlet package
ServletConfig is one per one Servlet.Each servlet as its
own ServletConfig object.The ServletConfig object is
provided by the Container during the initialization phase
of the Servlet.ServletConfig object can be user to read
initialization parameters into the Servlet from web.xml.

ServletContext is one per one web-application.All servlets
which are in a web-application have common ServletContext.
ServletContext can be used to communicate the Servlet with
the ServletContainer.It can also be used to read
initialization parameters from web.xml.It can be used to
share some resources between servlets which are in a web-
application.(resources like Connection object)

Is This Answer Correct ?    16 Yes 0 No

what is difference between servletconfig and servletcontext?..

Answer / suganthi

Servlet Config: Servlet config is Unique for every Servlet.

Servlet Context: Servlet Context is same for all the Servlet.

Is This Answer Correct ?    4 Yes 0 No

what is difference between servletconfig and servletcontext?..

Answer / dileep

1.servletconfig is nothing but per one servlet and servlet
context is nothing but per entier web Application.

Is This Answer Correct ?    5 Yes 2 No

Post New Answer

More Core Java Interview Questions

What is package private scope in java?

0 Answers  


Can an abstract class be a final class?

0 Answers  


What are the two types of exceptions in java? Which are the differences between them?

0 Answers  


What is the difference between static method and instance method in Java?

0 Answers   SwanSoft Technologies,


Why does java have two ways to create child threads?

0 Answers  


where u use Abstraction and Interface in real time

3 Answers   Sonata,


What is float in java?

0 Answers  


where can we get jAVA project orientation traing in HYDERABD

0 Answers  


Can a for statement loop indefinitely?

3 Answers  


What is difference between length and length() method in java ?

0 Answers  


What methods are used in Servlet?Applet communication?

0 Answers   Satyam,


What is difference between calling start() and run() method of thread?

0 Answers  


Categories