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
What is meant by a servlet?
What is the use of httpservletresponsewrapper?
Explain their methods? Tell me their parameter names also have you used threads in servlet?
Describe in brief RequestDespatcher?
What is http servlet?
Can we get PrintWriter and ServletOutputStream both in a servlet?
What are the difference between RMI and Servlets?
What do you mean by web applications? Explain web application directory arrangement?
What is a servlet context object?
What are the types of Session Tracking ?
What is session tracking?
How do you define a servlet?
What is the default http method in the servlet?
What is the disadvantage of cookies?
What are the supporting protocol by HttpServlet ?