struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Hess" <>
Subject Handling runtime tag exceptions?
Date Wed, 17 Jul 2002 19:20:38 GMT
Hi All,

I have a jsp page that is building the UI using a bunch of
<html:img>/<html:rewrite> and <bean:write> tags. The first action that
processes the request to the application populates the session with some
required attribute used throughout the application. I would like to avoid
having all my actions check for the existence of this attribute and rather
have the user forwarded to the main action if an error occurs by setting the
first action as the errorPage.

What happens is that I get the IllegalStateException: cannot forward() once
the buffer has been written. This is because many tags are successfully
executed before the <bean:write> throws the runtime error. The only way I
can make it work is by making the exception tag the first tag in the page.

Is there another way to handle runtime tag exceptions?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message