I have an ExceptionHandler action that I want to process all exceptions
(errors) that get thrown by any Action.

To do this I have the following actions.xml

<!--
WebWork Action / View Mapping
-->
<actions>

  <!-- global views -->
  <action>
    <view name="success">/WEB-INF/views/success.vm</view>
    <view name="error">ExceptionHandler.action</view>
    <view name="home">/index.html</view>
  </action>
  
  <action name="ExceptionHandlerAction" alias="ExceptionHandler">
    <view name="success">/WEB-INF/views/ExceptionHandler.vm</view>
  </action>
  
  <action name="LoginAction" alias="Login">
    <view name="success">/WEB-INF/views/Login.vm</view>
      <command name="login">
        <view name="success">Home.action</view>
      </command>
      <command name="logout">
        <view name="success">/index.html</view>
      </command>
    <view name="exception">ExceptionHandler.action</view>
    <view name="login">Login.action</view>
  </action>
  
  <action name="FavouriteListAction" alias="FavouriteList">
    <view name="success">/WEB-INF/views/FavouriteList.vm</view>
    <view name="exception">ExceptionHandler.action</view>
    <view name="login">Login.action</view>
  </action>

</actions>


This works well if I have the 'exception' and 'login' views defined in
FavouriteListAction.

If I remove them from there, and put them in the global views section (see
above) the ServletDispatcher doesn't detect that the exception or login view
is an instance of ViewActionWrapper, therefore it doesn't chain my
properties to the ExceptionHandlerAction.

Is this a bug, or do I have to place these two views in every action ?

Thanks,

..cam..



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to