You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Davide Bruzzone <Da...@ngt.com> on 2002/12/03 19:02:17 UTC

RE: A single error page when using Struts 1.0.2 templates: Is thi s possible?

Yes, that's what we did for our actions, and it works OK... What I'm trying
to find out though is how to deal with exceptions that occur within the
JSPs. It seems as though the added complexity of Struts, etc. makes it more
difficult to redirect to a single error page if, say, an error occurs as a
result of an incorrectly configured Struts tag, etc. 

The way I'm simulating an exception within my JSP is simply:

<%
	System.out.println("********** CONTENT: Throwing exception
**********");
	
	throw new Exception("My exception from the template JSP - 12");
%>

We have to be able to deal with this by going to a single error page no
matter how many pages make up the view. What we'd rather avoid if possible
is a partially displayed view with an error page bolted on in the middle of
the view. If, however, its just not possible, then I suppose we'll have to
live with it.

Cheers...

Dave

-----Original Message-----
From: Michael Lee [mailto:mleejr@hotmail.com]
Sent: Tuesday, December 03, 2002 10:51 AM
To: Struts Users Mailing List
Subject: Re: A single error page when using Struts 1.0.2 templates: Is
this possible?


We set up a global forward for errors...
  <global-forwards>
      <forward name="systemError" path="/system_error.jsp"/>
  </global-forwards>
and when we catch exceptions beyond the normal we do a
mapping.findForward("systemError");

----- Original Message -----
From: "Davide Bruzzone" <Da...@ngt.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Tuesday, December 03, 2002 12:29 PM
Subject: A single error page when using Struts 1.0.2 templates: Is this
possible?


> Greetings all...
>
> I've been puuling my hair out on this one for a while now, and I'm
beginning
> to wonder whether or not I should be spending any more time on it. Is it
> even possible?
>
> i.e. When using templates (We're still using Struts 1.0.2), is it possible
> to have exceptions within the JSPs be redirected to a single error page
> (i.e. An error page that takes up the whole window in the browser). I keep
> having problems related to part of the page being rendered, then the error
> occurring.
>
> Any help would be GREATLY appreciated...
>
> Cheers...
>
> Dave
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>