users
[Top] [All Lists]

Re: [cinjug-users] Struts question: how do you handle an undefined Actio

To: users@xxxxxxxxxx
Subject: Re: [cinjug-users] Struts question: how do you handle an undefined ActionForward value?
From: Brian K Bonner <brian.bonner@xxxxxxxxxxxx>
Date: Fri, 10 Dec 2004 15:01:50 -0500
Delivered-to: mailing list users@cinjug.org
In-reply-to: <OF540735C4.42CD2DDF-ON85256F66.00628BD0-85256F66.0063B614@kroger.com>
Mailing-list: contact users-help@cinjug.org; run by ezmlm
Good question.

You're basically returning a null ActionForward from your Action, because 
the page is not found by the ActionMapping.  It *is* because you have a 
programming error in your app.
You could subclass ActionMapping to return an error page if a forward is 
not found (to help you as the programmer).  What do other struts folks do?

Brian

steve.gutter@xxxxxxxxxx wrote on 12/10/2004 01:09:06 PM:

> 
> Granted that it shouldn't happen, but how do you handle the circumstance
> when the ActionModel class's
> execute method returns an ActionForward value which is not defined as a
> forward name= value
> in the ActionModel's action definition in struts-config.xml?
> 
> 
> It causes the app to go to a blank page, but no exceptions, etc. are
> thrown.
> 
> I'm using the action entry with unknown="true" for the case where I have 
an
> href="xyz.do" and there is no
> action defined for /xyz (which, again, granted shouldn't happen), but 
this
> doesn't catch the other scenario.
> 
> 
> ---------
> You may unsubscribe from this mailing list
> by sending a blank email addressed to:
> users-unsubscribe@xxxxxxxxxx
> 
> --
> Find additional help by sending a blank email
> addressed to:
> users-help@xxxxxxxxxx
> 


<Prev in Thread] Current Thread [Next in Thread>