Bug 356 - sendRedirect() embedded in JSP not working with mod_jk Apache connector BugRat Report#637
Summary: sendRedirect() embedded in JSP not working with mod_jk Apache connector BugRa...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 3
Classification: Unclassified
Component: Connectors (show other bugs)
Version: 3.2 Final
Hardware: All All
: P1 normal with 7 votes (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
: 357 762 4676 (view as bug list)
Depends on:
Blocks:
 
Reported: 2000-12-20 12:08 UTC by Anonymous BugRat User
Modified: 2004-11-16 19:05 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomcat Developers Mailing List 2000-12-20 12:08:30 UTC
If you create a JSP page like the following:

<HTML>

<B> Blah Blah HTML </B>

<% response.sendRedirect("/root/myjspdir/newpage.jsp"); %>

</HTML>

it will not correctly redirect you to newpage.jsp when using the mod_jk connector(AJPV13). You get back some of the HTML at the begining with the HTTP response header inserted in the page(among other weird effects). However if you try this page by using tomcat directly, i.e 192.187.223.123:8080/thisjsp.jsp, it will redirect to the other page(newpage.jsp) just fine. 

This appears to be a problem with the mod_jk or AJPV13 connector(s)
Comment 1 Dan Milstein 2001-02-13 12:34:21 UTC
*** Bug 357 has been marked as a duplicate of this bug. ***
Comment 2 Dan Milstein 2001-03-04 19:41:55 UTC
Tested by Steve Jones <stevejones@qwest.net> -- couldn't reproduce.
Comment 3 Ignacio J. Ortega 2001-03-11 15:35:05 UTC
*** Bug 762 has been marked as a duplicate of this bug. ***
Comment 4 Kirk Rasmussen 2001-03-15 17:20:50 UTC
You have to retry accessing the URL 4-5 times to get it to happen with v 3.2.1 
final.
Comment 5 David Verdier 2001-04-04 07:32:21 UTC
Same problem with IIS on NT 4.0 and redirector (isapi_redirect.dll).
Comment 6 Ignacio J. Ortega 2001-05-21 09:11:57 UTC
I had the very same problem  usin ajp12 and IIS/Tomcat 3.3..i'll put this bug 
in the NEW state thus confirming it..
Comment 7 Ignacio J. Ortega 2001-06-02 14:48:28 UTC
Fixed in Tomcat 3.3
Comment 8 Ignacio J. Ortega 2001-11-06 08:01:52 UTC
*** Bug 4676 has been marked as a duplicate of this bug. ***
Comment 9 Peter Rexa 2002-07-03 10:34:43 UTC
Hi,
I reopend this Bug because i`m using Tomcat 3.3 final with isapi_redirect.dll 
27.3.2002 just downloaded from jakarta website and IIS 5.0 on Windows 2k 
Server.  

This is what i get

t&#8211;î¡3Ët&#8216;<Û&#353;&#402;Wöm,Êÿ &#8212;&#8224;7®}Zï6ØQØns-Õ¬BU&#8226;
EÝ¥/^gÃLöjüªX&#381;8ãÎ}UMTª~<ß&#8226;ÿ &§Â"ðñnâ\&#8212;&#352;îÌãá &#376;p&#381;&#732;ñbõW.õ'ë~ß-.Élq3&#710;½&#8216;U½&#8249;g­¢
§^÷ÞÊÆí¼Ë&&#8222;ª§u@ß¡O»A>41£P&#8226;dãàâUÄZ&#8221;¸ðåÊ$·Ï&#8211;W\|.£0USN7ù]F&#8240;§N&#353;Òç×á&#339;×·&#352;¼&#8230;
i¨³*ÉÏÊoyo&#710;NfQ<&#8212;<|:1&#8240;¼;ªöñáI9óW&#8216;&#8250;¦&#339;ʶqä&#8212;
&#376;q&#338;5o*¯,5òªUâÁ¡UJCb&#402;xª®Ø&#402;$.
&#8482;Uáö&#8226;ù8TËj¬ª²¦Ä&#376;~ú&#338;ú$;¤<*ò©cËüØéÞ^oú&#352;Õv?³&#8216;Þô&#8212;
Vtæ±Á´E&#8482;oj:~&#8217;mù&#8220;&þµ¤aØëç_cG´»°¸9_ZEoÃ&#8225;ÿ W&#8221;F[ñ	ì:&#8230;
&#352;&#382;ðªë¶U³Öç¹ax&#352;Ce&#8225;1U&#8482;_}
MxE¹Ans~aÌ©ßÕ79eÑíÕ®~&#381;h£53ì¯+6æñædÜö¨ÅO*YÂeåÆKSuSÓØ÷õEá¤s+óÏÂ÷&#8482;óßu&#8216;Ó"!
WÏf£uÍ}
¤·&#710;&#339;"ü&#353;&#376;(üy¿H&#376;s¹Hªk³Wá|õæ|±t&#8240;Ï&#710;ªK»¯&#8222;Î&#376;PZÓX&#8226;}oÕoìø,&#8226;JÚ,jeNì-îï+%64m?
x5U&#8221;P\A¶ZÎbÞ¥k'¬µlÔMOv¢ùøG·+&#710;&#8216;&#8225;.ò¼Vÿ +¨&#8216;4s+ç>¾j&#353;¾ß¨P&#710;±ªÙʳ³&#8212;A 
¹N&#382;e7Ï&#710;Mñò¼&#710;Ý#¦B&#339;ñâ¯g>VÑ£S&#8482;gÇ%¼­cyBñ=¡©R¯
[T·&#710; Ø*«²A&#8217;
O&#352;
ç&#8250;S3Ã&#8364;ëλ·ôÛìÇ&JD&#8212;&#8225;P&#8222;J&#353;E^ur¦·Ã&#8482;êÛ'QFxE½FÈi&#376;m{&#8225;þ7&#8226;¬â³&#8212;&#732;¬»yAiqÞjÛ-æa9&#710;
[ÂTûK¯æ97&#382;+(Ö(&#8211;8&#339;¼<_Xáf"[ÛÃ&#376;×ÙÅõĺyf[ÃUDEèª^×W__<±fYM¦áµ§ÈJ&#339;¢·Ïcu±|ªÑÂ;°
ìîåÑ×Õ½øbX&#8249;2åç&#8212;OÂ3QRæU^Ê&#8211;v&#8240;R9S&#402;&#8221;B`ÙÄ+?U&#376;I@¨³)&#8222;H¼72©äbL&#8226;#&#8226;8g
[4F&#382;ò·r;K2prÚ,U&#8225;uW&#8222;·c")À²bÖB:&#8222;8¸Sáóò±&#402;oÄæeyçä·&#8230;£&#352;ªwU½ïÃ>>«XÑ)Ê*mõó
ßoqÓVòÚÖ<}ð¡&#8250;&#8221;&#8240;,¥öùN§¯ÂþjKLr­5®<Frr¼b&:j&#353;ñæ/<ø«hÑ&#8224;&#353;·&#8221;Z&#8482;q&#353;«2¥«È±diÂ9T-
Ûj&#8221;i&#8222;UÜ(&#8211;J«2@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@AÁAÁA
ö&#8221;ëÂ}&#382;ç½¥öîЮ_Bóz5pâ]=;svG&#376;tÝåû=æ4Ær&#8240;Ràñ6Y&#8230;M&#339;©/Ðì>ëmÒÞ&^ÅOé,³®+]
c&#732;§¹4áT%&#8222;xVݪc§&#8225;׶²ä[&#732;9c&#8211;/D&#8211;x¼¯\×&#8224;\¾Uº m&#8230;ïé-áXë-q¦É1**·Ue^ªd&#381;¶ÝWQ&#8250;ÃNò&#353;&#8211;$¹
[&#8211;&#710;ª«
&#8230;¬ª3Z1iÂKlÆuôY§²­&#353; ÈXÝÊ8[&#8226;­¶3cï=æêpr´b&#8240;TYVs¶óð&#353;ÜOv´ù%ãåg&îò¿¼ø8ú­
#D§2&#338;ß_4ÕöñÑ¢UnªÊ&#8250;&#8216;"jSH­-öñqë殣F¤i§{qâ&#339;sæ-¢1§&#8482;Sá&#376;fÄj±n¨µ2,&#8250;j¬ª&#8211;
¯"cb¬&#710;&#8217;ØÒ#x&#352;¢
$P³$&#710;PkpPDu¤ÿ Uô½¿¨-
[f16àæmÁÊà ð&#8240;>Mu&#8222;{°ÅÛz!÷Ñ!¦&#382;"˯ós&#376;&#8225;&#352;ö&#8224;­ã&#8224;ÙZ""%
è®yy®&#8249;8&#710;2ãjT´ÝWGr·¶ó²ðÔÛ&#402;I
¤«Øò¤é¹vy$T&#8220;&#710;¼7¿D&#8211;¿&#8216;&#8226;Â&#8226;^3·&#8230;&#352;²¤êSá¶8&#8249;¼²Þ&#353;uåm.RB"°Ü&#8216;&#381;&#8482;á%
Õ&#353;çá¨&#8250;«j´&#8220;u*ðr6×&#710;-&#381;*°¨ôOºÌznäX&#8250;&#338;^µ#ùÊ&#8220;õµUßìæ!M²K&#381;ý/7IzB·Ï^²¤íÆ&#8216;Ê3áxH}%
y¹M*p&#352;¥¶/$©
Æ·&#8211;²3·&#376;&#8221;ÛkZ&#8217;ÛÞ©¸¾o¡&#710;U$+<ùk||'³O&#352;·ÇÃ?&#376;&#8226;&#8249;ýêT_óò³¬Â&#8220;ÏÉ||-
#DÅM*$çå6ñð³.Z"C&#8218;Ë-â'©Wã&#8230;9åÎËós¦â»Lv&#8482;ûAùêþ&#352;û§Ù¼åéYO&#8249;sz
_Hà&#8240;Ì©=w¦[_*3r"¸2#856ãeP¬7&#8211;¹«&#353;¥R-¨&#8211;"¤oA°
UWd&#402;$ÈPj!A¤&#8230;gZA	ÖU³&#376;
ë^P&#339;aW7Êu<!K`K*Óu&#352;y1*TÍ^ÅT»kN6à&#8249;&#8218;Y&#8222;±(&#382;®b_CØ&#8240;ÝNPGѨE^v)pÈí,2Ö&#339;vűÑTÖ&#353;f!?
oS&#8221;iÅõ%&#8482;ØoóB>&#8482;»¤¶Ågb&#8222;ÖÜ1µ·Rf+ª&#8250;&#8225;5ÛF&#8217;"K2Þa&#8224;¶ï&#8224;!x&#8225;6\Ë£ß&#8225;ñÊ-Û§_¸1&#8230;º_ljj­
îêsj&#8217;ú¸²
J;ÂBC&#8482;²T¶;$§$Ý$M&#352;ÎâV&#8220;u&#8218;ı&#8216;¶¯+Î&#8482;¶¹2^°&#8224;Î÷ySq|^£Pww&#8212;?Ë£á>4GÒxg|§±¬ñò_?F!
ê_?ñò³b ÓM8&#8226;¸å^xy_&#8250;·&#8482;%tnÎ%Lhí&#8249;&#381;&#8230;Åè«ÉÇÊ&#8211;òàÊð!ÃÓ¼&#338;ê&#8482;0z&#8222;ln9U¾áU-&#8211;ëÃ&#8211;&#376;IaÙ&#8211;uú-
¡\ήÄT³nK%U&#8222;                                                   Å$(5 ÒB&#8218;3­ 
&#710;ë!¹LøLq^eI&#8212;mé)²¡&#8216;6þõHTTP/1.1 100 Continue
Server: Microsoft-IIS/5.0
Date: Wed, 03 Jul 2002 09:55:30 GMT

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Wed, 03 Jul 2002 09:55:30 GMT
Connection: close
Content-Type: text/html;charset=ISO-8859-1












<html ...
page follows
Comment 10 Peter Rexa 2002-07-10 08:30:39 UTC
Hallo,
my mistake.
I wrote more Data into a Buffer then needed (<img src="myservlet" .../>)

When this Connection was reused by the Browser (Keep-Alive=300) mod_jk or 
isapi.dll hadn´t flushed the Buffer.