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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which method returns the length of a string?

1048


What is immutable class in java?

956


How to handle a web browser resize operation?

1091


What advantage do java's layout managers provide over traditional windowing systems?

966


What is an example of a conditional statement?

1066


Difference between == and .equals() ?

1013


Why do we need variables?

995


Can a boolean be null java?

990


Can a method be overloaded based on different return type but same argument type?

982


What are the different types of inheritance in java?

998


Differentiate between static and non-static methods in java.

1063


Can a class extend 2 classes in java?

1045


Is string a wrapper class?

1027


What is not thread safe?

995


What are exception handling keywords in java?

1044