Sandeep Bhojwani wrote:
> Can I at RUN TIME & from within a servlet detect the Servlet API
> version being supported by the web server/Servlet Engine ???
>
Beginning with the 2.1 API, there are calls for this --
ServletContext.getMajorVersion() and ServletContext.getMinorVersion(). Before
that, you are out of luck.
>
> I am writtng a servlet that is both 1.0 and 2.0 compliant. Now if my
> client has a web server that is 1.0 compliant then I use my own session
> tracker else I just ignore my session tracker and use web server's
> implementation of the same.
>
You must have compiled your servlet against the 2.0 servlet classes, right?
One thing you could do would be to just try to call getSession() -- if you get
a "method not implemented" exception, you know that you're in a 1.0
environment.
>
> TIA,
> sandeep
>
Craig McClanahan
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html