}
}
private void beforeDispatch(GeronimoStandardContext webContext, ServletRequest request, ServletResponse response) {
BeforeAfter beforeAfter = webContext.getBeforeAfter();
if (beforeAfter != null) {
Stack<BeforeAfterContext> stack = currentContext.get();
BeforeAfterContext beforeAfterContext = new BeforeAfterContext(webContext.getContextCount() + 2);
String wrapperName = getWrapperName(request, webContext);
beforeAfterContext.contexts[webContext.getContextCount()] = JACCRealm.setRequestWrapperName(wrapperName);
beforeAfterContext.contexts[webContext.getContextCount() + 1] = PolicyContext.getContextID();
PolicyContext.setContextID(webContext.getPolicyContextId());
beforeAfter.before(beforeAfterContext, request, response, BeforeAfter.DISPATCHED);
stack.push(beforeAfterContext);
}
}