struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <>
Subject RE: Struts Error Page Approach - Recommended / Struts Support
Date Wed, 28 Nov 2001 02:43:46 GMT
a combination of 2 and 4 works well. ie, put together ActionErrors, forward
to the page where they are displayed with <html:errors/>

Of course, you don't have to use ActionErrors - and list will do, but why
not? :)

- Brett

-----Original Message-----
From: Greg Callaghan []
Sent: Wednesday, 28 November 2001 1:41 PM
Subject: Struts Error Page Approach - Recommended / Struts Support


Wondering what the typical struts approach is to handling and passing back 
errors to the user is.   I'm not talking about ActionForm validation, but 
rather the situation where an Action determines there is a error (ie either 
directly itself or via an exception from a business object).

What is recommended approach with struts?
- use of servlet "errorpage" specified in Web.xml?
  (not sure how this works yet, still have to find good doco)
- use of struts "errorpage" as GLOBAL FORWARD to JSP which
  assumes maybe a ERROR_MESSAGE in request scope?
- incorporate use of struts validation error infrastruture somehow?
  (eg re-use ActionErrors perhaps)?
- would creating an ActionError in the Action itself and forwarding
  back to the original JSP page be possible in the case where there
  is not normally form validation on this page.  ie leverage off
  ability to put <html:errors/> in JSP just to handle presentation
  of backend errors (ie not formbean validation errors).

I'm assuming the general approach overall is to throw business logic errors 
up the chain until hitting the Action classes so one may then present an 
appropriate error message to the user (via one of the approaches above?).


Get your FREE download of MSN Explorer at

To unsubscribe, e-mail:
For additional commands, e-mail:

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