Craig,

Thanks very much for your answer. I was thinking about asking you on
the Jserv list (but I didn't want to presume your availability).

I think you've misunderstood me a little bit, perhaps I was taking to
many shortcuts (a habit I'm affrai).

The first thing is - as I understand it - getResource() is there to
be used by Servlet programmers and it may be legitimate for them to
get the contents of resources by requesting a particular file.

IMHO:
RequestDispatchers are for when you want to deal in a specific way
with executable content (ok - exe tied to a resource that is
conceptually just a resource).

getResource() is a more general method which may be exported by a
servlet into a different programming enviornment. getResource() is the
far easier method to understand for the non-servleteer. I can conceive
of add ons to servlet engines that use getResource to present
management pages for example.

Therefore it might be quite legitimate for a server to do
   getResource("/somepath/file.ext");

Where a servlet SomeServ is mapped to the path: /somepath

The file.ext part may be what is required syntactically by SomeServ.
Who knows?

I suspect that we may see the API going down this route and
eventually getting rid of RequestDispatchers since it makes the "I'm
just a resource perhaps generated on the fly by a servlet" more
explicit.

I am not actually trying to use getResource() myself. Just implement
it in my Servlet engine.

What I was really trying to get to the bottom of is whether you could
call getResource() on another path outside of the context engine and
expect to get a legitimate result.

I think you've answered that - so once again:

Thanks.


BTW of course you're right about URLHandlers, I was taking a short
cut again. Sorr




Nic Ferrier
Tapsell-Ferrier Ltd
www.tapsellferrier.co.uk

___________________________________________________________________________
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