views:

297

answers:

1

In struts2 version 2.1.x there is a new UnknownHandler that kicks in when a request arrives and the action name cannot be found.

The question is...what is the equivalent mechanism if one exists in 2.0.x versions?

I recently noticed from examining the log files that exceptions are thrown when the action name is not properly resolved and this is actually causing some problems. Is there an application wide setting for handling this?

+1  A: 

Wildcard default or action default?

http://struts.apache.org/2.0.14/docs/action-configuration.html#ActionConfiguration-WildcardMethod

<action name="*">
  <result>/{1}.jsp</result>
</action>

...

<package name="Hello" extends="action-default">

    <default-action-ref name="UnderConstruction">

    <action name="UnderConstruction">
        <result>/UnderConstruction.jsp</result>
    </action>

    ...
steamer25
Strange how no amount of searching on the wiki or google turned up that page. Thanks for the pointer.
Vincent Ramdhanie