AFAIK, the only way in java to get what you ask for, is to raise an
Exception at the end of the forward() method.
Even doing so, you could wrap the forward() call in a try / catch block,
avoiding whatever mechanism the servlet engine
could use to get the desired behaviour.

Thespecification says that no ouput must be commited from the calling
servlet *before* the
forward() call, but says nothing about conditions after the call (Servlet
2.3 Spec. SRV 8.4).

If normal control flow should be broken after the call, I think the Java
Team would be in great problems ;-)

> Hi,
>
> I think this is a bug as per the servlet specification.Just check with
some
> other servlet engine. I will forward this error to tomcat developer list.
I
> was tested with Tomcat3.2.2.
>
> Velmurugan P.
> Java Team.
>
> > 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, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to