Thanks.  That sounds terrific, but how does the servlet container
know which to do?  I.e., the  resource could be something which
is expected to be severed as a static file (i.e., a .html) and therefore
should be unpacked or it  could  be something that the java programmer
is expecting to access via the getResource() method and therefore should not
be unpacked.  What differentiates them?  I see the resource-ref in web-app
descriptor (2.2).  Is that the diferentiator, or is that for a different
purpose?

Thanks for your clarification.

Jason Hunter wrote:

> > 1) Unpack the .war into a suitable directory (unpacking is needed
> > due to the way the servlet API is built, paths to documents are
> > handled as straight file paths).
>
> Actually, a server can support WARs without requiring the user to do any
> unpacking.  First, the server can read directly from the WAR -- assuming
> the servlet programmer propertly used the getResource() methods
> introduced in API 2.1 which were designed to support exactly this.
> Second, the server could unpack the WAR into a temp directory itself on
> startup and read files out of the temp dir.  The API 2.2 reference
> implementation (Jakarta) supports both of these techniques.
>
> -jh-
>
> --
> Jason Hunter
> [EMAIL PROTECTED]
> Book:    http://www.servlets.com/book
> 2.0 to 2.1: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.html
> 2.1 to 2.2: http://www.javaworld.com/jw-10-1999/jw-10-servletapi.html
>
> ___________________________________________________________________________
> 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
begin:vcard
n:Stevens;Gael
x-mozilla-html:TRUE
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Gael Stevens
end:vcard

Reply via email to