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

What is httpservlet class?

1226


Name the different ways of session tracking.

1078


What are the benefits of using servlet over cgi?

1127


What is a servlet context object?

1190


What are the advantages of servlets over traditional cgi?

1145


Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?

1146


What is the use of httpservletrequestwrapper and httpservletresponsewrapper?

1099


Differentiate between get and post?

1210


Define servlet mapping?

1221


Explain the features are in servlet 3?

1101


Explain the difference between generic servlet and http servlet?

1036


What’s the difference between forward() and sendredirect() methods?

1060


hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code

2836


What do you mean by httpservlet and how it is different from the genericservlet?

1120


Why the concept of single thread model interface is used?

1049