org.acegisecurity.webwork
Class AcegiDispatcherUtils

java.lang.Object
  extended by com.opensymphony.webwork.dispatcher.DispatcherUtils
      extended by org.acegisecurity.webwork.AcegiDispatcherUtils

public class AcegiDispatcherUtils
extends com.opensymphony.webwork.dispatcher.DispatcherUtils

WebWork DispatcherUtils that ignores Acegi exceptions so they can be processed by ExceptionTranslationFilter.

This is meant to be fixed inside WebWork, see WW-291. Known broken versions are 2.2.3 and 2.2.4.

Version:
$Id: AcegiDispatcherUtils.java 1657 2006-09-06 17:18:36Z carlossg $
Author:
Carlos Sanchez

Nested Class Summary
 
Nested classes/interfaces inherited from class com.opensymphony.webwork.dispatcher.DispatcherUtils
com.opensymphony.webwork.dispatcher.DispatcherUtils.Locator
 
Field Summary
 
Fields inherited from class com.opensymphony.webwork.dispatcher.DispatcherUtils
devMode, paramsWorkaroundEnabled
 
Constructor Summary
protected AcegiDispatcherUtils(ServletContext servletContext)
           
 
Method Summary
 void serviceAction(HttpServletRequest request, HttpServletResponse response, ServletContext context, com.opensymphony.webwork.dispatcher.mapper.ActionMapping mapping)
           Loads the action and executes it.
 
Methods inherited from class com.opensymphony.webwork.dispatcher.DispatcherUtils
cleanup, createContextMap, createContextMap, getInstance, getMaxSize, getSaveDir, init, initialize, isPortletSupportActive, prepare, sendError, setInstance, setPortletSupportActive, wrapRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AcegiDispatcherUtils

protected AcegiDispatcherUtils(ServletContext servletContext)
Method Detail

serviceAction

public void serviceAction(HttpServletRequest request,
                          HttpServletResponse response,
                          ServletContext context,
                          com.opensymphony.webwork.dispatcher.mapper.ActionMapping mapping)
                   throws ServletException

Loads the action and executes it. This method first creates the action context from the given parameters then loads an ActionProxy from the given action name and namespace. After that, the action is executed and output channels throught the response object. Actions not found are sent back to the user via the DispatcherUtils.sendError(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext, int, java.lang.Exception) method, using the 404 return code. All other errors are reported by throwing a ServletException.

Difference between this and WebWork prvided class is that any unhandled exception will be thrown instead of processed inside WebWork.

Overrides:
serviceAction in class com.opensymphony.webwork.dispatcher.DispatcherUtils
Parameters:
request - the HttpServletRequest object
response - the HttpServletResponse object
mapping - the action mapping object
Throws:
ServletException - when an unknown error occurs (not a 404, but typically something that would end up as a 5xx by the servlet container)


Copyright © 2004-2006 Acegi Technology Pty Limited. All Rights Reserved.