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 can we refresh automatically when new data has entered the database?

1056


What is the process to implement doget and dopost methods?

932


What are the differences between servlet context vs servlet config?

1023


What is servlet and its types?

1003


how many jsp scripting elements are there and what are those?

968


What is load-on-startup in servlet?

1074


What are the phases of a servlet life cycle?

1055


How can we upload the file to the server using servlet?

1003


What are the difference between RMI and Servlets?

1521


What is a servlet engine?

971


What are the steps involved in placing a servlet within a package?

1033


What are the supporting protocol by HttpServlet ?

1116


What is servlet in web technology?

992


What is url encoding and url decoding

1091


How printwriter is different from servletoutputstream?

955