tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Stone <cityli...@petmystone.com>
Subject Re: RequestDispatcher anomolies (Tomcat v4.1.24)
Date Tue, 17 Jun 2003 15:03:08 GMT
This issue is archived at:
http://marc.theaimsgroup.com/?l=tomcat-user&m=105578975520239&w=2

Timothy Stone wrote:
> I have to say, the behavior seems almost identical to the described 
> behavior of RequestDispatcher#include since control is given back to the 
>  forwarding servlet. The subtle differences are to explored further on 
> this end.
> 
> Thank you Yoav and Tim.

Well, my "further exploration" proved fruitful. I went home and picked 
up my copy of /Codenotes for J2EE/. Excellent resource BTW. It noted, as 
both Tim and Yoav caught, that when RequestDispatcher#forward is part of 
an executing method in the caller, control is indeed returned! D'oh! 
CNJ2EE offered two "workarounds":

One: as noted, return explicitly from the executing method OR

Two: explictly use out.close() in the called resource. (not useful when 
the called resource is static HTML with a JSP extension to support HTTP 
POST I guess)

As in all the earlier notes I had run across, and the source of my 
confusion, RequestDispatcher#forward is stated as passing control 
*permanently* to the called resource. The use of "permanently" may not 
be best. It brings to mind Vizzini's use of "inconceivable" and Inigo 
Montoya's observation: "You keep using that word. I do not think it 
means what you think it means."* :)

Tim

* /The Princess Bride/ (what a great movie!)



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message