Jboss5引用PrepareOperations 报空指针

import org.apache.struts2.dispatcher.ng.PrepareOperations;

    private PrepareOperations prepare;

    public void init(FilterConfig filterConfig) throws ServletException {
        InitOperations init = new InitOperations();
        try {
            FilterHostConfig config = new FilterHostConfig(filterConfig);
            init.initLogging(config);
            Dispatcher dispatcher = init.initDispatcher(config);

            prepare = new PrepareOperations(filterConfig.getServletContext(), dispatcher);
        } catch (Throwable e) {
e.printStackTrace();
} finally {
            init.cleanup();
        }

    }

当后面doFilter引用prepare,prepare.createActionContext(request, response)报空指针。
为何Jboss4还好好的,jboss5要搞一堆配置,web.xml好多问题(servlet 2.4完全没法用),弄到最后还给我报这么个哭笑不得的错误?启动还慢过jboss4,真是郁闷。

你可能感兴趣的:(apache,Web,xml,servlet)