I am using spring loading and I would like to use sitemesh3 for my project. I need to add a sitemesh filter, I create this class:
@Configuration
public class Initializer implements ServletContextInitializer{
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
FilterRegistration.Dynamic sitemesh = servletContext.addFilter("sitemesh", new ConfigurableSiteMeshFilter());
EnumSet<DispatcherType> sitemeshDispatcherTypes = EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD);
sitemesh.addMappingForUrlPatterns(sitemeshDispatcherTypes, true, "*.jsp");
}
}
I created a file sitemesh3.xmlin the WEB-INF directory, but nothing happened, did I miss some configuration?
source
share