Neal Kaiser wrote:
>
> > Neal Kaiser wrote:
> > >
> > > I have a bean, which can RequestDispatcher.forward() to an
> ErrorHandler.jsp
> > > file. Since this is a bean, even though I put a return statement after
> the
> > > forward(), the control will still go back to the servlet/jsp file (it
> just
> > > exits from the bean method, not the service() method)...
>
> > Custom tags in JSP 1.1 will let you deal with this in a better way.
> > A tag handler can return a code telling the JSP container to not
> > process the rest of the page (actually, generate a return after the tag
> > handler call).
> >
>
> What is the syntax for this?
See the JSP 1.1 specification, http://java.sun.com/products/jsp/
It's described in "5.4.2 Basic Protocol: Tag Interface".
> > In JSP 1.0, you have to deal with this using scriptlets, e.g.:
> >
> > <jsp:useBean id="x" ... />
> >
> > <%
> > x.doSomethingThatMayForward();
> > if (x.isForwarded) {
> > return;
> > }
> > %>
> >
>
> That is where my problem roots from. A "return" statement in a bean doesn't
> return from the service() method,it just
> returns back to the calling Servlet/JSP.
But in the example above, the return is not in the bean, it's in a scriptlet
in the JSP calling the bean. It will therefore end the processing of the
_jspService method in the JSP page implementation class.
> Where can I find some examples on taglib? I've checked the latest specs, but
> would like some more examples....
There will be more examples as time goes by; note that this is all brand
new stuff. The only JSP containers I know of that implements JSP 1.1 are
Jakarta's Tomcat (http://jakarta.apache.com) and Orion Server
(http://www.orionserver.com).
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html