public void prepare() {
ActionContext actionContext = ActionContext.getContext();
HttpServletRequest request = (HttpServletRequest) actionContext.get(StrutsStatics.HTTP_REQUEST);
ConversationContextManager contextManager = scopeContainer.getComponent(HttpConversationContextManagerProvider.class).getManager(request);
try {
scopeContainer.getComponent(ConversationProcessor.class).processConversations(new StrutsConversationAdapter(actionContext.getActionInvocation(), contextManager));
Map<String, Map<String, String>> stackItem = new HashMap<String, Map<String, String>>();
stackItem.put(StrutsScopeConstants.CONVERSATION_ID_MAP_STACK_KEY, ConversationAdapter.getAdapter().getViewContext());
actionContext.getValueStack().push(stackItem);
} catch (ConversationException e) {
LOG.error("Programmatic Conversation error in Prepare method", e);