> It's not obvious to me that an implementation of the API REQUIRES you to
> pass in only request objects created by the servlet engine just so that a
> dispatcher can check its current state. If a RequestDispatcher is given a
> request object that was not created by the engine then it seems to me that
> the engine can reasonably trust that the caller knows what they're doing and
> that the request object is in "proper condition" (that the getOutputStream
> or getWriter method has not been called).
This may be so and it is feedback that will be considered as the spec
moves forward.
> The spec now seems to be saying that a servlet should get request parameters
> from the getParameter method UNLESS the servlet has been forwarded a message
> from another servlet via RequestDispatcher. In that case a servlet should
> use the getAttribute method instead. Only...a servlet has no clue where
> requests come from. So, now servlets are forced to use both getParameter
> and getAttribute in order to figure out what people might be trying to pass
> to them.
A paramter comes in from the client. An attribute is set by the system
(servlet engine) or some component running in the system (such as a
servlet that dispatches to another). To mix the two concepts is unclear.
> Another thing I do is this: I often want to look at results before I include
> them in my main servlet's output. For instance, if i tried to included
> something but got an error response then I might just choose not to include
> that thing instead of returning an error response to the browser.
>
> > RD is not a general RPC mechanism. If you need to do fancy self
> > dispatching, I'd recommend that you build a system to do that yourself.
> I already do this myself. I thought the RequestDispatcher mechanism was
> supposed to a replacement.
No, it's not intended to be a replacement for self dispatching amongst a
system of objects that you allready have good knowledge of.
.duncan
___________________________________________________________________________
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