This commit is contained in:
Rossen Stoyanchev
2018-02-09 10:42:47 -05:00
parent 0b432c2404
commit fb43aa40ed
2 changed files with 3 additions and 4 deletions

View File

@@ -61,7 +61,7 @@
<artifactId>jsf-impl</artifactId> <artifactId>jsf-impl</artifactId>
<version>${mojarra.version}</version> <version>${mojarra.version}</version>
</dependency> </dependency>
<!-- JSF implementation: MyFaces <!-- JSF implementation: MyFaces (also change DispatcherServletInitializer)
<dependency> <dependency>
<groupId>org.apache.myfaces.core</groupId> <groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId> <artifactId>myfaces-api</artifactId>

View File

@@ -4,8 +4,6 @@ import javax.servlet.Filter;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import com.sun.faces.config.ConfigureListener;
import org.springframework.web.filter.CharacterEncodingFilter; import org.springframework.web.filter.CharacterEncodingFilter;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
@@ -44,7 +42,8 @@ public class DispatcherServletInitializer extends AbstractAnnotationConfigDispat
// Declare Spring Security Facelets tag library // Declare Spring Security Facelets tag library
servletContext.setInitParameter("javax.faces.FACELETS_LIBRARIES", "/WEB-INF/springsecurity.taglib.xml"); servletContext.setInitParameter("javax.faces.FACELETS_LIBRARIES", "/WEB-INF/springsecurity.taglib.xml");
servletContext.addListener(ConfigureListener.class); // Comment out if not using Mojarra
servletContext.addListener(com.sun.faces.config.ConfigureListener.class);
// Let the DispatcherServlet be registered // Let the DispatcherServlet be registered
super.onStartup(servletContext); super.onStartup(servletContext);