protected void applyDecorator(Page page, Decorator decorator,
HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
ServletContext servletContext = filterConfig.getServletContext();
ActionContext ctx = ServletActionContext.getActionContext(req);
if (ctx == null) {
OgnlValueStack vs = new OgnlValueStack();
vs.getContext().putAll(DispatcherUtils.getInstance().createContextMap(req, res, null, servletContext));
ctx = new ActionContext(vs.getContext());
if (ctx.getActionInvocation() == null) {
ActionSupport action = new ActionSupport();
vs.push(action);
ctx.setActionInvocation(new DummyActionInvocation(action));
}
}
applyDecorator(page, decorator, req, res, servletContext, ctx);
}