How can I maintain "application scope data" in Servlets or JSPs as ASPs do?

Alex Chaffee

In the Servlets 2.1 spec, you can set a Servlet Context Attribute. For example, getServletContext().setAttribute("counter", new foo.Counter()); . You can also access (or initialize) these Attributes as Application Scope Beans in a JSP, using <jsp:useBean scope="application">.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact