Lefty Burgess wrote:

> Hines, Bill writes:
>  > "IBM's WebSphere is not a fully Java Servlet 2.2 compliant container."
>  >
>  > With the fixpack though, WebSphere 3.5 is brought up to date on servlets 2.2
>  > and JSP 1.1.
>
> (My apologies if this is off-topic for this list.)
>
> "Brought up to date on servlets 2.2 and JSP 1.1" does not necessarily
> mean that WebSphere is a fully compliant servlet container.  What you
> have indicated is that it is at least partially compliant.
>
> Java Servlets 2.2, as I have read it the specifications, is what
> defines war files, their layout, and how they are to be handled by the
> container.
>
> Since WebSphere 3.5.2 only has deployment support for war files, it
> cannot be fully compliant.
>

I'm not familar with the details of WebSphere, but accepting WARs as a deployment
format is all that is all that is required.  See Section 9.3 of the 2.2 spec, which
says:

    The specification defines a hierarchical structure which can exist
    in an open file system, an archive file, or some other form for deployment
    purposes.  It is recommended, but not required, that servlet containers
    support this structure as a runtime representation.

As long as the container provides an environment that complies with the
programmatic requirements of the servlet API (such as resolving getResource() and
getResourceAsStream() calls correctly), it does not matter what internal
architecture is used to represent the components of the application.

Just as one example of an implication of this:  it is not portable to assume that
you can use file I/O to talk to "files" within the web application document root.
The only portable mechanism is ServletContext.getResource() and
ServletContext.getResourceAsStream() -- which is why Struts uses these calls for
things like reading the configuration file.

>
> The whole point of a war file (and this has already appeared on the
> list) is such that one can drop the war into any given compliant
> container and it just work.  However, one cannot simply drop a war
> file into WebSphere and expect it to work.  Utilities must be used to
> *convert* the war file into a WebSphere application.
>

Some sort of deployment tool is required by pretty much any application server.
Even something simple like Tomcat has such a tool (the text editor you use to tweak
properties in server.xml :-).

>
> The fact that WebSphere 3.5.2 does not *natively* support war files
> speaks for itself in demonstrating that WebSphere is not fully
> Servlets 2.2 compliant.
>
> That was my only point:  that "support for WAR files" does not equal
> fully compliant servlet container.
>

Are there particular aspects of WebSphere that cause Struts-based applications to
still fail, even when you properly deploy a web application using their tools?

Craig McClanahan


Reply via email to