cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ricardo Rocha" <rica...@apache.org>
Subject RE: XSP requires Servlet 2.2 API
Date Wed, 19 Jan 2000 05:38:44 GMT
XSP has been tested under and is known to work with JDK1.1.7
and Servlet 2.0.

You can use XSP with Servlet 2.[12] objects and methods but you're
not _forced_ to do so.

This is a very important distinction.

The XSP core libraries have been designed in such a way that only
methods explicitly used in your XSP pages will actually inline code
in the generated Java class.

Plainly stated this means: if your servlet engine supports a feature
provided by XSP, then feel free to use. If it doesn't, then don't use
it but rest assured the reamining features will still work correctly.

Thus, if you use the XSP built-in  libraries with JServ 2.0 (btw, my
own development environment) and you do _not_ explicitly use any
2.[12] feature, your XSP will work correctly. Of course, if you do,
you'll get an abstract method error in JServ...

The idea here is to ensure users of older Servlet versions (namely,
2.0) can use XSP while allowing users of more recent versions to
fully leverage their improved capabilities.

> it seems the much of the XSP code requires methods from
> the Servlet API 2.2, such as in XSPResponseLibrary, method addDateHeader()
> calls the response object addDateHeader() which only exists in
> the 2.2 API.

Again, if your servlet engine does not support this feature,
don't use it. True, some of these new constructs could have
been "simulated" in terms of the older API, but it's clearly not
XSP's role to do this. The discipline is simple: use only the
methods and signatures supported by your current servlet
engine.

As a general rule, methods deprecated by Servlet 2.[12] are
_not_ supported. A few heavily used deprecated methods are
still supported, though.  Example: if you are restricted to
Servlet 2.0, you should use:

  <session:set-value name="myVar" value="myValue"/>

instead of

  <session:set-attribute name="myVar" value="myValue"/>

which, of course, will work correctly with Servlet 2.2.



Mime
View raw message