@Override
public void serviceAction(HttpServletRequest request,
HttpServletResponse response, ServletContext context,
ActionMapping mapping) throws ServletException {
ValueStackFactory valueStackFactory;
boolean devMode;
boolean handleException;
try {
valueStackFactory = (ValueStackFactory) FieldUtils.readField(this,
"valueStackFactory", true);
devMode = (Boolean) FieldUtils.readField(this, "devMode", true);
handleException = (Boolean) FieldUtils.readField(this,
"handleException", true);
} catch (Exception ex) {
throw new RuntimeException(ex);
}
Map<String, Object> extraContext = createContextMap(request, response,
mapping, context);
// If there was a previous value stack, then create a new copy and pass
// it in to be used by the new Action
ValueStack stack = (ValueStack) request
.getAttribute(ServletActionContext.STRUTS_VALUESTACK_KEY);
boolean nullStack = stack == null;
if (nullStack) {
ActionContext ctx = ActionContext.getContext();
if (ctx != null) {
stack = ctx.getValueStack();
}
}
if (stack != null) {
extraContext.put(ActionContext.VALUE_STACK,
valueStackFactory.createValueStack(stack));
}
String timerKey = "Handling request from Dispatcher";
try {
UtilTimerStack.push(timerKey);