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 difference you refer to with regards to HttpSession is a difference
between versions of the Servlet API. In 2.1 only put/getValue were
defined, but in 2.2 set/getAttribute were added to be consistent with the
method names used for attribute methods in all other classes. You can still
use put/getValue in Tomcat (since it implements 2.2) if you want your code
to be backwards compatible with the 2.1 API (implemented by JSWDK 1.0.1).
So back to the original question, all servlet containers that implement the
same version of the Servlet API are compliant (unless they are buggy ;-).
The set/getAttribute methods where added to ServletContext in 2.1 (I believe)
so you should be able to use them in any 2.1 or 2.2 compliant container.
Hans
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
===========================================================================
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