Search in sources :

Example 1 with ExecuteOperations

use of org.apache.struts2.dispatcher.ExecuteOperations in project entando-core by entando.

the class Struts2ServletDispatcher method init.

@Override
public void init(ServletConfig filterConfig) throws ServletException {
    InitOperations init = new InitOperations();
    Dispatcher dispatcher = null;
    try {
        ServletHostConfig config = new ServletHostConfig(filterConfig);
        init.initLogging(config);
        dispatcher = init.initDispatcher(config);
        init.initStaticContentLoader(config, dispatcher);
        prepare = new PrepareOperations(dispatcher);
        execute = new ExecuteOperations(dispatcher);
    } finally {
        if (dispatcher != null) {
            dispatcher.cleanUpAfterInit();
        }
        init.cleanup();
    }
}
Also used : PrepareOperations(com.agiletec.apsadmin.system.dispatcher.PrepareOperations) InitOperations(com.agiletec.apsadmin.system.dispatcher.InitOperations) ExecuteOperations(org.apache.struts2.dispatcher.ExecuteOperations) Dispatcher(org.apache.struts2.dispatcher.Dispatcher) ServletHostConfig(org.apache.struts2.dispatcher.servlet.ServletHostConfig)

Example 2 with ExecuteOperations

use of org.apache.struts2.dispatcher.ExecuteOperations in project entando-core by entando.

the class StrutsPrepareAndExecuteFilter method init.

@Override
public void init(FilterConfig filterConfig) throws ServletException {
    InitOperations init = new InitOperations();
    Dispatcher dispatcher = null;
    try {
        FilterHostConfig config = new FilterHostConfig(filterConfig);
        init.initLogging(config);
        dispatcher = init.initDispatcher(config);
        init.initStaticContentLoader(config, dispatcher);
        this.prepare = new PrepareOperations(dispatcher);
        this.execute = new ExecuteOperations(dispatcher);
        this.excludedPatterns = init.buildExcludedPatternsList(dispatcher);
        this.postInit(dispatcher, filterConfig);
    } finally {
        if (dispatcher != null) {
            dispatcher.cleanUpAfterInit();
        }
        init.cleanup();
    }
}
Also used : FilterHostConfig(org.apache.struts2.dispatcher.filter.FilterHostConfig) ExecuteOperations(org.apache.struts2.dispatcher.ExecuteOperations) Dispatcher(org.apache.struts2.dispatcher.Dispatcher)

Aggregations

Dispatcher (org.apache.struts2.dispatcher.Dispatcher)2 ExecuteOperations (org.apache.struts2.dispatcher.ExecuteOperations)2 InitOperations (com.agiletec.apsadmin.system.dispatcher.InitOperations)1 PrepareOperations (com.agiletec.apsadmin.system.dispatcher.PrepareOperations)1 FilterHostConfig (org.apache.struts2.dispatcher.filter.FilterHostConfig)1 ServletHostConfig (org.apache.struts2.dispatcher.servlet.ServletHostConfig)1