tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sexton, George" <gsex...@mhsoftware.com>
Subject RE: Forwarding in servlets.
Date Tue, 08 Oct 2002 12:41:56 GMT
Please remember that in both forward and send re-direct, execution of the
current servlet will resume  unless you put a return statement after the
forward or re-direct statement.

if (dispatcher!=null) {
	dispatcher.forward(request, response) ;
	return;
	}

-----Original Message-----
From: Kwok Peng Tuck [mailto:pengtuck@makmal.com]
Sent: 08 October, 2002 12:42 AM
To: tomcat-user@jakarta.apache.org
Subject: Forwarding in servlets.


Is there any way besides the following :

 request.setAttribute("selectedScreen", request.getServletPath()) ;
           RequestDispatcher dispatcher =
request.getRequestDispatcher("/test.jsp") ;
           if (dispatcher!=null) {
                dispatcher.forward(request, response) ;
           }
to forward a request to a jsp page. Is it possible to use
response.sendRedirect like in jsp ?
Any suggestions will be great.


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


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


Mime
View raw message