本文整理了Java中javax.servlet.http.HttpServletRequestWrapper.getServletContext()
方法的一些代码示例,展示了HttpServletRequestWrapper.getServletContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpServletRequestWrapper.getServletContext()
方法的具体详情如下:
包路径:javax.servlet.http.HttpServletRequestWrapper
类名称:HttpServletRequestWrapper
方法名:getServletContext
暂无
代码示例来源:origin: cloudfoundry/uaa
@Override
public ServletContext getServletContext() {
return super.getServletContext();
}
代码示例来源:origin: org.springframework.boot/spring-boot
@Override
public ServletContext getServletContext() {
this.simulateGetMethod = false;
return super.getServletContext();
}
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http
@Override
public String getServletPath() {
if (servletPath == null) {
try {
Method m = ServletContext.class.getMethod("getFilterRegistration", new Class[] {String.class});
Object registration = m.invoke(super.getServletContext(), new Object[]{filterName});
if (registration != null) {
m = registration.getClass().getMethod("getUrlPatternMappings", new Class[] {});
Collection<String> mappings =
CastUtils.cast((Collection<?>)m.invoke(registration, new Object[]{}));
if (!mappings.isEmpty()) {
String mapping = mappings.iterator().next();
if (mapping.endsWith("/*")) {
servletPath = mapping.substring(0, mapping.length() - 2);
}
}
}
} catch (Throwable ex) {
// ignore
}
if (servletPath == null) {
servletPath = "";
}
}
return servletPath;
}
代码示例来源:origin: com.github.wuic/wuic-servlet
/**
* {@inheritDoc}
*/
@Override
public ServletContext getServletContext() {
// Synchronized access
synchronized (mutex) {
return super.getServletContext();
}
}
代码示例来源:origin: apache/cxf
@Override
public String getServletPath() {
if (servletPath == null) {
try {
Method m = ServletContext.class.getMethod("getFilterRegistration", new Class[] {String.class});
Object registration = m.invoke(super.getServletContext(), new Object[]{filterName});
if (registration != null) {
m = registration.getClass().getMethod("getUrlPatternMappings", new Class[] {});
Collection<String> mappings =
CastUtils.cast((Collection<?>)m.invoke(registration, new Object[]{}));
if (!mappings.isEmpty()) {
String mapping = mappings.iterator().next();
if (mapping.endsWith("/*")) {
servletPath = mapping.substring(0, mapping.length() - 2);
}
}
}
} catch (Throwable ex) {
// ignore
}
if (servletPath == null) {
servletPath = "";
}
}
return servletPath;
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
@Override
public String getServletPath() {
if (servletPath == null) {
try {
Method m = ServletContext.class.getMethod("getFilterRegistration", new Class[] {String.class});
Object registration = m.invoke(super.getServletContext(), new Object[]{filterName});
if (registration != null) {
m = registration.getClass().getMethod("getUrlPatternMappings", new Class[] {});
Collection<String> mappings =
CastUtils.cast((Collection<?>)m.invoke(registration, new Object[]{}));
if (!mappings.isEmpty()) {
String mapping = mappings.iterator().next();
if (mapping.endsWith("/*")) {
servletPath = mapping.substring(0, mapping.length() - 2);
}
}
}
} catch (Throwable ex) {
// ignore
}
if (servletPath == null) {
servletPath = "";
}
}
return servletPath;
}
内容来源于网络,如有侵权,请联系作者删除!