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 ServletContext() and what is its use?

Answer Posted / telo

Data saved in a ServletContext scope is shared by all
servlets and JSPs in the context. The data stored in the servlet
context is destroyed when the servlet context is destroyed.
//save and get an application-scoped value
getServletContext().setAttribute(“application-value”,
“shopping-app”);
value = getServletContext().getAttribute(“application-value”);

Is This Answer Correct ?    28 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Elucidate servlet attributes and its scope?

943


Is dispatcher servlet a singleton?

964


What is called a session?

1116


What is MIME Type?

1093


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

966


What is the functionality of actionservlet and requestprocessor?

1026


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

959


What is the major difference between context parameter and context attribute?

1044


How do I know if java is running on linux?

1049


What is servlet container. how it works?

1088


Who is responsible to create the object of servlet?

1155


What is httpservlet class?

1056


What is SingleThreadModel interface?

1090


What do you mean by default initialization in java servlet?

1055


What do you mean by servlet?

1104