struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Mun <yc...@sbcglobal.net>
Subject Re: DispatchAction: Invalid Method call
Date Thu, 09 Mar 2006 00:55:22 GMT
The "unspecified()" method is only invoked if the
parameter wasn't passed in.  However, when an invalid
method name is passed in, a
java.lang.NoSuchMethodException exception is thrown.

If possible, I want "unspecified()" to be invoked for
invalid method names also...

Example... parameter name: "param"
 param=validMethod => DispatchAction.validMethod()
 param=NULL => DispatchAction.unspecified()
 param=invalidMethod => NoSuchMethodException is
THROWN!!

thanks.

--- Paul Benedict <paul4christ79@yahoo.com> wrote:

> Joe, override the unspecified method. That method
> is invoked whenever the dispatch cannot be resolved.
> 
> --- Joe Mun <ycmun@sbcglobal.net> wrote:
> 
> > Using DispatchAction, if a non-existent method
> name is
> > passed, a java.lang.NoSuchMethodException is
> thrown. 
> > How  (and where) can I catch (and ignore) this
> > exception, so that invalid methods default to
> > "unspecified(..)"???
> > 
> > Thanks!
> > 
> >
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message