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...

Is there any differance b/w getting servlet context from
servlet config and session? if yes then what is that?

Answer Posted / rajendra singh bisht

You can get reference to ServletContext through ServletConfig. HttpSession does not provide a reference to ServletContext object.

To get a ServletContext object use

getServletConfig().getServletContext();

or you can call directly getServletContext() bcoz GenericServlet class implements ServletConfig interface also.

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is servlet lazy loading?

1229


What is difference between jsp and servlet?

1210


Which application server is best for java?

1123


What are the mechanisms used by a servlet container for maintaining session information?

1083


List the Different types of servlet?

1093


How is an application exception handling is done using a servlet?

1058


Is dispatcher servlet a singleton?

1070


What are the phases of servlet life cycle?

1167


What is Servlet API used for connecting database?

1142


What is a deployment descriptor?

1156


What is servlet instance?

1100


Is servlet synchronized?

1135


How can we create deadlock situation in servlet?

1488


How do we call one servlet from another servlet?

1100


What is a server side include (ssi)

1236