espen dall�kken wrote:
> I read in an article that you can manage applications in a ASP like fashion
> in JSP using the ServletContext object.
> My question is if the ServletContext object is implemented in the same way
> in most servlet engines or if there are differences simular to the
> differences in using the HttpSession object. Using the HttpSession on the
> Tomcat engine I had to use get and setParameter, but in JSWDK 1.0.1 I have
> to use set and putValue, so is the ServletContext object handled differently
> also ?
>
The reason you should use getAttribute() / setAttribute() on a session in Tomcat,
which is based on the 2.2 servlet API, was to make session attributes consistent
with servlet context attributes and request attributes. (The getValue/putValue
calls actually still work, but they've been deprecated to encourage you to switch
to the new usage.) It is not an issue of which servlet engine you are running;
what matters is which version of the servlet API that engine supports.
The getAttribute() / setAttribute() calls work on a ServletContext in all servlet
engines based on the 2.1 or later API (JSWDK is based on the 2.1 API) -- these
methods didn't exist in the 2.0 API.
Craig McClanahan
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html