Support for new ServletContext methods in Servlet 4.0 b03
Issue: SPR-12674
This commit is contained in:
parent
e61e8d5062
commit
eeb01db888
|
@ -132,6 +132,10 @@ public class MockServletContext implements ServletContext {
|
|||
|
||||
private int sessionTimeout;
|
||||
|
||||
private String requestCharacterEncoding;
|
||||
|
||||
private String responseCharacterEncoding;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new {@code MockServletContext}, using no base path and a
|
||||
|
@ -563,6 +567,26 @@ public class MockServletContext implements ServletContext {
|
|||
return this.sessionTimeout;
|
||||
}
|
||||
|
||||
// @Override - but only against Servlet 4.0
|
||||
public void setRequestCharacterEncoding(String requestCharacterEncoding) {
|
||||
this.requestCharacterEncoding = requestCharacterEncoding;
|
||||
}
|
||||
|
||||
// @Override - but only against Servlet 4.0
|
||||
public String getRequestCharacterEncoding() {
|
||||
return this.requestCharacterEncoding;
|
||||
}
|
||||
|
||||
// @Override - but only against Servlet 4.0
|
||||
public void setResponseCharacterEncoding(String responseCharacterEncoding) {
|
||||
this.responseCharacterEncoding = responseCharacterEncoding;
|
||||
}
|
||||
|
||||
// @Override - but only against Servlet 4.0
|
||||
public String getResponseCharacterEncoding() {
|
||||
return this.responseCharacterEncoding;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Unsupported Servlet 3.0 registration methods
|
||||
|
|
|
@ -132,6 +132,10 @@ public class MockServletContext implements ServletContext {
|
|||
|
||||
private int sessionTimeout;
|
||||
|
||||
private String requestCharacterEncoding;
|
||||
|
||||
private String responseCharacterEncoding;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new {@code MockServletContext}, using no base path and a
|
||||
|
@ -563,6 +567,26 @@ public class MockServletContext implements ServletContext {
|
|||
return this.sessionTimeout;
|
||||
}
|
||||
|
||||
// @Override - but only against Servlet 4.0
|
||||
public void setRequestCharacterEncoding(String requestCharacterEncoding) {
|
||||
this.requestCharacterEncoding = requestCharacterEncoding;
|
||||
}
|
||||
|
||||
// @Override - but only against Servlet 4.0
|
||||
public String getRequestCharacterEncoding() {
|
||||
return this.requestCharacterEncoding;
|
||||
}
|
||||
|
||||
// @Override - but only against Servlet 4.0
|
||||
public void setResponseCharacterEncoding(String responseCharacterEncoding) {
|
||||
this.responseCharacterEncoding = responseCharacterEncoding;
|
||||
}
|
||||
|
||||
// @Override - but only against Servlet 4.0
|
||||
public String getResponseCharacterEncoding() {
|
||||
return this.responseCharacterEncoding;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Unsupported Servlet 3.0 registration methods
|
||||
|
|
Loading…
Reference in New Issue