com.gruuf.struts2.gae.dispatcher.GaeInitOperations Maven / Gradle / Ivy
package com.gruuf.struts2.gae.dispatcher;
import org.apache.struts2.dispatcher.Dispatcher;
import org.apache.struts2.dispatcher.HostConfig;
import org.apache.struts2.dispatcher.InitOperations;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
public class GaeInitOperations extends InitOperations {
@Override
protected Dispatcher createDispatcher(HostConfig filterConfig) {
Map params = new HashMap<>();
for (Iterator e = filterConfig.getInitParameterNames(); e.hasNext(); ) {
String name = (String) e.next();
String value = filterConfig.getInitParameter(name);
params.put(name, value);
}
return new GaeDispatcher(filterConfig.getServletContext(), params);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy