tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Stone <>
Subject Re: RequestDispatcher anomolies (Tomcat v4.1.24)
Date Tue, 17 Jun 2003 15:03:08 GMT
This issue is archived at:

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."* :)


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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message