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

How can the session in servlet can be destroyed?

1184


Why are http servlets used in programming?

1009


how the HTML data stored in web server?

2636


What is the use of attribute in servlets?

1048


What is the need of servlet filters?

1011


Why HttpServlet class is declared abstract?

1218


Why do we need servlet filter?

1058


What are the functions of Servlet container?

1121


What is the difference between context parameter and context attribute?

1048


Explain the jar and war files in servlet?

1104


Differentiate between the web server and application server?

1064


What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

1033


What are the uses of servlet

1180


When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?

1103


In the servlets, we are having a web page that is invoking servlets ,username and password? which is checks in database? Suppose the second page also if we want to verify

1005