You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gustavo Felisberto <gu...@wit-software.com> on 2009/11/11 16:17:45 UTC

Catching: Unable to instantiate Action

I have a Project were we have in struts.xml:

 

<action name="/*_*" class="packge.to.actions.{1}" method="{2}">

            <result name="success">/WEB-INF/plugins/{1}/{2}.jsp</result>

</action>

 

<global-exception-mappings>

      <exception-mapping exception="java.lang.Exception" result="error" />

</global-exception-mappings>

 

<global-results>

      <result name="error">/WEB-INF/Error.jsp</result>                 

</global-results>

 

If any exception is thrown in my actions the global maping catches it and
sends to correct JSP. If user enters some Url where the Class exists but the
method does not the exception mapping works ok. Problem is if the Class does
not exist. In that case I get a struts error page (if debug mod is on) or a
tomcat error page. Any way to catch this exception?

 

-- 

Gustavo Felisberto.

WIT-Software, Lda

Coimbra (Portugal), San Jose (California)

Phone: +351239801030

Web:  <http://www.wit-software.com> http://www.wit-software.com