Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

Commit

Permalink
Adding Servlet 4 dependency and fixing compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
arjantijms committed Sep 9, 2017
1 parent 136d419 commit 8ddc5f2
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 1 deletion.
7 changes: 7 additions & 0 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,13 @@
</build>

<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
Expand Down
41 changes: 40 additions & 1 deletion impl/src/test/java/com/sun/faces/mock/MockServletContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
import javax.servlet.SessionTrackingMode;
import javax.servlet.descriptor.JspConfigDescriptor;

// Mock Object for ServletContext (Version 2.5)
// Mock Object for ServletContext (Version 4.0)
public class MockServletContext implements ServletContext {

private Hashtable attributes = new Hashtable();
Expand Down Expand Up @@ -305,4 +305,43 @@ public void declareRoles(String... strings) {
public String getVirtualServerName() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}



@Override
public ServletRegistration.Dynamic addJspFile(String string, String string1) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

@Override
public int getSessionTimeout() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

@Override
public void setSessionTimeout(int i) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

@Override
public String getRequestCharacterEncoding() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

@Override
public void setRequestCharacterEncoding(String string) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

@Override
public String getResponseCharacterEncoding() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

@Override
public void setResponseCharacterEncoding(String string) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}


}
16 changes: 16 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,20 @@
<module>util</module>
</modules>

<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
</dependencies>

</project>

0 comments on commit 8ddc5f2

Please sign in to comment.