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 / sandhya

YES,There is some difference,when we deploy the web
application the web container will create the Context
object and when we load the servlet class then container
will create config object,so for each web application web
container will create one servlet context obj and for each
servlet web container will create servlet config object.

Generally we use this objects to avoid the hardcoding,we
declare this variables in deployment descriptor,we declare
context parameters under web-app tag so that all servlets
can use this parameter values ,and config parameters under
servlet tag so that only specific servlet can use this
parameter values,in simple way context object is like
global object and config obj is like local obj.

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you invoke a servelt?

1126


Which HTTP method is non-idempotent?

1135


What is URL Encoding?

1182


What do you mean by web applications? Explain web application directory arrangement?

966


What is the servlet?

1091


Explain the difference between jsp and servlet?

1088


Is dispatcher servlet a singleton?

1017


Write a command to get actual path of a servlet to the server?

1034


Can you use javascript in servlets?

1088


What is servletconfig?

1034


What is the major difference between servlet and applet?

1003


What is meant by session? Tell me something about httpsession class?

1031


Explain the different ways for servlet authentication?

1102


Differentiate between the get and post method

1064


What are the important functions of filters?

1149