use of org.springframework.web.context.support.HttpRequestHandlerServlet in project PublicCMS-preview by sanluan.
the class ResourceInitializer method onStartup.
public void onStartup(ServletContext servletContext) throws ServletException {
Dynamic registration = servletContext.addServlet("defaultServlet", new HttpRequestHandlerServlet());
registration.setLoadOnStartup(1);
registration.addMapping(new String[] { "/resource/*", "/favicon.ico" });
Dynamic webfileRegistration = servletContext.addServlet("webfileServlet", new HttpRequestHandlerServlet());
webfileRegistration.setLoadOnStartup(0);
webfileRegistration.addMapping(new String[] { "/webfile/*" });
Filter[] filters = getServletFilters();
if (!ObjectUtils.isEmpty(filters)) {
for (Filter filter : filters) {
registerServletFilter(servletContext, filter, new String[] { "defaultServlet", "webfileServlet" });
}
}
}
Aggregations