> > Actually, a server can support WARs without requiring the
> > user to do any unpacking.Gael Stevens wrote:
>
> 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

The server can serve HTML files from a WAR.  Just ask for
/context_path/index.html and it serves index.html from the correct WAR.

> or it  could  be something that the java programmer
> is expecting to access via the getResource() method

getResource() works either way, since the server knows where to look
for the data.  Remember, with getResource() you don't specify a file
path, just a logical path.  You get back a URL so the data might be
even on another machine.

> What differentiates them?

Basically, the server knows what to do so unless the servlet is trying
to read using java.io.* objects like File (discouraged as of API 2.1)
things should work hunky dory.  :-)

-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

Reply via email to