tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amrhein, Thomas" <tamrh...@debis.com>
Subject AW: sendRedirect() problem
Date Fri, 14 Jul 2000 14:39:17 GMT
Hi,
 
I think, you use relative paths.
 
If you use sendRedirect, you have to add your servlet context to the path.
 
example:
 
You have the pages 
http://myserver/mycontext/startpage.jsp
<http://myserver/mycontext/startpage.jsp>  
http://myserver/mycontext/endpage.jsp
<http://myserver/mycontext/endpage.jsp> 
 
In startpage.jsp you type:
<jsp:forward...>  to /endpage.jsp
or
sendRedirect to /mycontext/endpage.jsp
 
hope this helps
 
Thomas
 
-----Urspr√ľngliche Nachricht-----
Von: Torben Kabel [mailto:torben.kabel@outline.ch]
Gesendet am: Freitag, 14. Juli 2000 16:18
An: tomcat-user@jakarta.apache.org
Betreff: Re: sendRedirect() problem
I have experienced similarly problems with sendRedirect using Apache and
Tomcat3.1 on Linux. But only when using  Internet Explore as client browser
and not with NN4.7 (both browsers on the same Windows NT machine). So far I
made a workaround using <jsp:forward...> 

/Torben 


Boris Reichel wrote: 


Dear Tomcat users and developers, 

I have a problem with the sendRedirect() ...  (which does not appear in 
the 
VisualAge WEB Test environment ... but I want to use Tomcat). 


I tried it with Tomcat 3.1 and 3.2b2 
When the servlet tries to redirect I always get an: Not Found (404) 
Error 


Maybe the following trace can give a hint: 
(the *******-line marks the place where the problem starts ... I think) 


... 
2000-07-14 03:31:53 - Ctx( /uniqa ): Get real path 
/SPS/DE/Images/berechnen.gif 
D:\Programs\jakarta-tomcat3.2\webapps\uniqa\SPS\DE\Images\berechnen.gif 
D:\Programs\jakarta-tomcat3.2\webapps\uniqa 
2000-07-14 03:31:56 - Ctx( /uniqa ): Get real path 
/SPS/DE/Internetbrowser/login-reaktion.html 
D:\Programs\jakarta-tomcat3.2\webapps\uniqa\SPS\DE\Internetbrowser\login-rea
ktion.html 
D:\Programs\jakarta-tomcat3.2\webapps\uniqa 
2000-07-14 03:31:56 - Ctx( /uniqa ): Get real path 
/SPS/DE/Images/uniqa-images/logo_medunten.gif 
D:\Programs\jakarta-tomcat3.2\webapps\uniqa\SPS\DE\Images\uniqa-images\logo_
medunten.gif 
D:\Programs\jakarta-tomcat3.2\webapps\uniqa 
2000-07-14 03:31:56 - Ctx( /uniqa ): Get real path 
/SPS/DE/Images/seule_gr.jpg 
D:\Programs\jakarta-tomcat3.2\webapps\uniqa\SPS\DE\Images\seule_gr.jpg 
D:\Programs\jakarta-tomcat3.2\webapps\uniqa 
******************************** 
2000-07-14 03:32:03 - Ctx(  ): 302 R(  + 
/servlet/sibs.sps.servlet.PresentationServlet + null) 
http://boris:8080/servlet/sibs.sps.servlet.PresentationServlet;jsessionid=1p
4j4eg4f1?reactionText=%20&origin=/uniqa/SPS/DE/Internetbrowser/Products/Visa
card/default-anonym.html&doSetReaction=X&reactionValue=WantsConsulting&PAGE=
../login-reaktion.html 
2000-07-14 03:32:03 - Ctx(  ): Handler tomcat.redirectHandler(null/null) 
tomcat.redirectHandler 
2000-07-14 03:32:06 - Ctx( /uniqa ): Get real path 
/SPS/DE/Internetbrowser/Products/login-reaktion.html 
D:\Programs\jakarta-tomcat3.2\webapps\uniqa\SPS\DE\Internetbrowser\Products\
login-reaktion.html 
D:\Programs\jakarta-tomcat3.2\webapps\uniqa 
2000-07-14 03:32:06 - ContextManager: No handler for request R( /uniqa + 
/ + /SPS/DE/Internetbrowser/Products/login-reaktion.html) 404 
2000-07-14 03:32:06 - Ctx( /uniqa ): 404 R( /uniqa + / + 
/SPS/DE/Internetbrowser/Products/login-reaktion.html) null 
2000-07-14 03:32:06 - Ctx( /uniqa ): Handler 
tomcat.notFoundHandler(null/null) tomcat.notFoundHandler 


To solve the problem I tried to return; and System.exit(0); after the 
sendRedirect() ... it changed nothing! 


All hints are welcome ... did I forgot to configure something? Where can 
I get a more detailed 
documentation of Tomcat? 


Thanks, 
    Boris 
_________________________________________________________________________ 


Dr. Boris Reichel                           Tel: +49 89 358680 - 17 
MGM EDV-Beratung GmbH                       Fax: +49 89 358680 - 88 
Frankfurter Ring 105a                    mailto:Boris.Reichel@mgm-edv.de
<mailto:Boris.Reichel@mgm-edv.de>  


80807 Munich (FRG)                         http://www.mgm-edv.de/
<http://www.mgm-edv.de/> 


Mime
View raw message