public void dispatch(String task) throws Exception {
Method method = null;
try {
method = this.getClass().getMethod(task+"Task", new Class<?>[0]);
} catch (Exception ex) {
throw new NotFoundException("Task ["+request.getTaskName()+"] not found for module ["+request.getModuleName()+"]");
}
this.preDispatch (method);
try {
method.invoke(this, new Object[0]);
} catch(InvocationTargetException ex) {
Throwable target = ex.getTargetException();
if (target instanceof Exception)
throw (Exception)target;
throw new IceException(ex.getTargetException(), 500);
} catch (Exception ex) {
throw new NotFoundException("Task ["+request.getTaskName()+"] not found for module ["+request.getModuleName()+"]");
}
this.postDispatch (method);
if (isUsingTemplate()) {