-
-
Save rmannibucau/c63afe1326ca9e7409735b3f5911ea45 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pom.xml b/pom.xml | |
index f39cd27..e60dc1b 100644 | |
--- a/pom.xml | |
+++ b/pom.xml | |
@@ -79,9 +79,29 @@ | |
<version>1.2.0</version> | |
<configuration> | |
<httpPort>9090</httpPort> | |
- <scanningIncludes>myfaces-api-${myfaces.version}.jar, | |
- myfaces-impl-${myfaces.version}.jar</scanningIncludes> | |
</configuration> | |
+ <dependencies> | |
+ <dependency> | |
+ <groupId>org.apache.tomcat</groupId> | |
+ <artifactId>tomcat-el-api</artifactId> | |
+ <version>9.0.2</version> | |
+ </dependency> | |
+ <dependency> | |
+ <groupId>org.apache.tomcat</groupId> | |
+ <artifactId>tomcat-jasper</artifactId> | |
+ <version>9.0.2</version> | |
+ </dependency> | |
+ <dependency> | |
+ <groupId>org.apache.tomcat</groupId> | |
+ <artifactId>tomcat-jasper-el</artifactId> | |
+ <version>9.0.2</version> | |
+ </dependency> | |
+ <dependency> | |
+ <groupId>org.apache.openwebbeans</groupId> | |
+ <artifactId>openwebbeans-el22</artifactId> | |
+ <version>2.0.2</version> | |
+ </dependency> | |
+ </dependencies> | |
</plugin> | |
</plugins> | |
</build> | |
diff --git a/src/main/java/org/apache/myfaces/sample/Setup.java b/src/main/java/org/apache/myfaces/sample/Setup.java | |
index 2d3a7a7..39b78c6 100644 | |
--- a/src/main/java/org/apache/myfaces/sample/Setup.java | |
+++ b/src/main/java/org/apache/myfaces/sample/Setup.java | |
@@ -1,3 +1,20 @@ | |
package org.apache.myfaces.sample; | |
-public class Setup {} | |
+import java.util.Set; | |
+ | |
+import javax.servlet.ServletContainerInitializer; | |
+import javax.servlet.ServletContext; | |
+ | |
+import org.apache.myfaces.webapp.StartupServletContextListener; | |
+ | |
+public class Setup implements ServletContainerInitializer { | |
+ @Override | |
+ public void onStartup(Set<Class<?>> set, ServletContext servletContext) { | |
+ servletContext.addListener(StartupServletContextListener.class); | |
+ /* | |
+ final JspFactory jspFactory = JspFactory.getDefaultFactory(); | |
+ final JspApplicationContext jspApplicationContext = jspFactory.getJspApplicationContext(servletContext); | |
+ jspApplicationContext.addELResolver(CDI.current().getBeanManager().getELResolver()); | |
+ */ | |
+ } | |
+} | |
diff --git a/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer b/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer | |
index e69de29..fefafd3 100644 | |
--- a/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer | |
+++ b/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer | |
@@ -0,0 +1 @@ | |
+org.apache.myfaces.sample.Setup | |
\ No newline at end of file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment