* </ul>
*
* @return a new WebWorkVelocityContext
*/
public Context createContext(OgnlValueStack stack, HttpServletRequest request, HttpServletResponse response) {
WebWorkVelocityContext context = new WebWorkVelocityContext(chainedContexts, stack);
context.put(REQUEST, request);
context.put(RESPONSE, response);
context.put(STACK, stack);
context.put(OGNL, ognlTool);
context.put(WEBWORK, new VelocityWebWorkUtil(context, stack, (HttpServletRequest) request, (HttpServletResponse) response));
/*
* Add actiontURl/actionXURL in the OGNL context for VM result to retrieve.
*/
String actionURL = com.opensymphony.webwork.portlet.context.PortletContext.getContext().getActionURL();
String actionXURL = actionURL+"?wwXAction=";
context.put(ACTION_URL, actionURL);
context.put(ACTION_XURL, actionXURL);
ActionInvocation invocation = (ActionInvocation) stack.getContext().get(ActionContext.ACTION_INVOCATION);
if (invocation != null) {
context.put(ACTION, invocation.getAction());
}
return context;
}