Hi, Here are some links I found info on:
http://www.javacommerce.com/tutorial/servlet/servlets4.html http://www.fawcette.com/javapro/2002_03/online/online_eprods/servlets_03_19/default_pf.asp The first one says: "The servlet is no longer involved with output for the current interaction after invoking forward(), thus only one call to the forward() method can be made in a particular servlet." I know this doesn't really state that execution ends here, but I do find it quite suggestive... The second one claims: "If you are forwarding control from a JSP page, you can also use the <jsp:forward> action element, which terminates the execution of the current JSP page and passes control to another resource. Its syntax is: <jsp:forward page="relativeURL"/> For example, <jsp:forward page="OtherPage.jsp"/> is translated into this code in the resulting servlet after the JSP page is parsed: pageContext.forward("OtherPage.jsp");" If the equivalence holds, then that would indeed mean that the servlet execution should end as well, since a JSP actually is a servlet... So if all that's true, then I guess it is indeed a Tomcat problem... Cheers, Hans On Fri, 2003-04-04 at 09:07, Ritesh Gupta wrote: > Hi, > > > Is it supposed to return control to the servlet afterwards? > > >From what I find on the net, it isn't, but when I try to print something > > to System.out after the forward call, that works... > > I'd be interested in what you found on the net that vouches for this. I > searched far and wide for this, but its not explicitly stated anywhere that > the flow in the servlet cannot continue. > > > I'm using JBoss/Tomcat btw... > > It works the same way in the app Servers I have tried it as well. Just to be > sure that the flow does not continue off where you write the forward, put a > return statement. > > Thanks and regards, > Ritesh > ----- Original Message ----- > From: "Hans Schippers" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, April 03, 2003 1:44 AM > Subject: does the getRequestDispatcher().forward() method return control? > > > > Hi, > > > > if in a servlet, I have some code like: > > > > getServletConfig().getRequestDispatcher("/my/page.jsp").forward(request, > > response) > > > > Is it supposed to return control to the servlet afterwards? > > > > >From what I find on the net, it isn't, but when I try to print something > > to System.out after the forward call, that works... > > > > So did I misread on the www, or is this some bug in my webserver? > > > > I'm using JBoss/Tomcat btw... > > > > Thanks, > > > > Hans > > > > > =========================================================================== > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the > body > > of the message "signoff EJB-INTEREST". For general help, send email to > > [EMAIL PROTECTED] and include in the body of the message "help". > > =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
