Package com.struts2.gae.dispatcher

Source Code of com.struts2.gae.dispatcher.GaePrepareAndExecuteFilter

package com.struts2.gae.dispatcher;

import javax.servlet.FilterConfig;
import javax.servlet.ServletException;

import org.apache.struts2.dispatcher.Dispatcher;
import org.apache.struts2.dispatcher.ng.ExecuteOperations;
import org.apache.struts2.dispatcher.ng.InitOperations;
import org.apache.struts2.dispatcher.ng.PrepareOperations;
import org.apache.struts2.dispatcher.ng.filter.FilterHostConfig;
import org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter;

public class GaePrepareAndExecuteFilter extends StrutsPrepareAndExecuteFilter {

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

      init.initStaticContentLoader(config, dispatcher);

      prepare = new PrepareOperations(filterConfig.getServletContext(),
          dispatcher);
      execute = new ExecuteOperations(filterConfig.getServletContext(),
          dispatcher);
      this.excludedPatterns = init.buildExcludedPatternsList(dispatcher);

      postInit(dispatcher, filterConfig);
    } finally {
      init.cleanup();
    }
  }
 
}
TOP

Related Classes of com.struts2.gae.dispatcher.GaePrepareAndExecuteFilter

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.