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
Elucidate servlet attributes and its scope?
Is dispatcher servlet a singleton?
What is called a session?
What is MIME Type?
how many jsp scripting elements are there and what are those?
What is the functionality of actionservlet and requestprocessor?
What is meant by session? Tell me something about httpsession class?
What is the major difference between context parameter and context attribute?
How do I know if java is running on linux?
What is servlet container. how it works?
Who is responsible to create the object of servlet?
What is httpservlet class?
What is SingleThreadModel interface?
What do you mean by default initialization in java servlet?
What do you mean by servlet?