本文整理了Java中org.glassfish.grizzly.http.server.Request.getDecodedRequestURI
方法的一些代码示例,展示了Request.getDecodedRequestURI
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getDecodedRequestURI
方法的具体详情如下:
包路径:org.glassfish.grizzly.http.server.Request
类名称:Request
方法名:getDecodedRequestURI
[英]Get the decoded request URI.
[中]获取已解码的请求URI。
代码示例来源:origin: javaee/grizzly
protected String getRelativeURI(final Request request) throws Exception {
String uri = request.getDecodedRequestURI();
if (uri.contains("..")) {
return null;
}
final String resourcesContextPath = request.getContextPath();
if (resourcesContextPath != null && !resourcesContextPath.isEmpty()) {
if (!uri.startsWith(resourcesContextPath)) {
return null;
}
uri = uri.substring(resourcesContextPath.length());
}
return uri;
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server
protected String getRelativeURI(final Request request) throws Exception {
String uri = request.getDecodedRequestURI();
if (uri.contains("..")) {
return null;
}
final String resourcesContextPath = request.getContextPath();
if (resourcesContextPath != null && !resourcesContextPath.isEmpty()) {
if (!uri.startsWith(resourcesContextPath)) {
return null;
}
uri = uri.substring(resourcesContextPath.length());
}
return uri;
}
代码示例来源:origin: javaee/grizzly
protected String getRelativeURI(final Request request) throws Exception {
String uri = request.getDecodedRequestURI();
if (uri.contains("..")) {
return null;
}
final String resourcesContextPath = request.getContextPath();
if (resourcesContextPath != null && !resourcesContextPath.isEmpty()) {
if (!uri.startsWith(resourcesContextPath)) {
return null;
}
uri = uri.substring(resourcesContextPath.length());
}
return uri;
}
代码示例来源:origin: javaee/grizzly
protected String getRelativeURI(final Request request) throws Exception {
String uri = request.getDecodedRequestURI();
if (uri.contains("..")) {
return null;
}
final String resourcesContextPath = request.getContextPath();
if (resourcesContextPath != null && !resourcesContextPath.isEmpty()) {
if (!uri.startsWith(resourcesContextPath)) {
return null;
}
uri = uri.substring(resourcesContextPath.length());
}
return uri;
}
代码示例来源:origin: javaee/grizzly
protected String getRelativeURI(final Request request) throws Exception {
String uri = request.getDecodedRequestURI();
if (uri.contains("..")) {
return null;
}
final String resourcesContextPath = request.getContextPath();
if (resourcesContextPath != null && !resourcesContextPath.isEmpty()) {
if (!uri.startsWith(resourcesContextPath)) {
return null;
}
uri = uri.substring(resourcesContextPath.length());
}
return uri;
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
protected String getRelativeURI(final Request request) throws Exception {
String uri = request.getDecodedRequestURI();
if (uri.contains("..")) {
return null;
}
final String resourcesContextPath = request.getContextPath();
if (resourcesContextPath != null && !resourcesContextPath.isEmpty()) {
if (!uri.startsWith(resourcesContextPath)) {
return null;
}
uri = uri.substring(resourcesContextPath.length());
}
return uri;
}
代码示例来源:origin: javaee/grizzly
protected String getRelativeURI(final Request request) throws Exception {
String uri = request.getDecodedRequestURI();
if (uri.contains("..")) {
return null;
}
final String resourcesContextPath = request.getContextPath();
if (resourcesContextPath != null && !resourcesContextPath.isEmpty()) {
if (!uri.startsWith(resourcesContextPath)) {
return null;
}
uri = uri.substring(resourcesContextPath.length());
}
return uri;
}
代码示例来源:origin: javaee/grizzly
protected String getRelativeURI(final Request request) throws Exception {
String uri = request.getDecodedRequestURI();
if (uri.contains("..")) {
return null;
}
final String resourcesContextPath = request.getContextPath();
if (resourcesContextPath != null && !resourcesContextPath.isEmpty()) {
if (!uri.startsWith(resourcesContextPath)) {
return null;
}
uri = uri.substring(resourcesContextPath.length());
}
return uri;
}
代码示例来源:origin: javaee/grizzly
protected String getRelativeURI(final Request request) throws Exception {
String uri = request.getDecodedRequestURI();
if (uri.contains("..")) {
return null;
}
final String resourcesContextPath = request.getContextPath();
if (resourcesContextPath != null && !resourcesContextPath.isEmpty()) {
if (!uri.startsWith(resourcesContextPath)) {
return null;
}
uri = uri.substring(resourcesContextPath.length());
}
return uri;
}
代码示例来源:origin: org.mule.glassfish.grizzly/grizzly-http-server
protected String getRelativeURI(final Request request) throws Exception {
String uri = request.getDecodedRequestURI();
if (uri.contains("..")) {
return null;
}
final String resourcesContextPath = request.getContextPath();
if (resourcesContextPath != null && !resourcesContextPath.isEmpty()) {
if (!uri.startsWith(resourcesContextPath)) {
return null;
}
uri = uri.substring(resourcesContextPath.length());
}
return uri;
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core
protected String getRelativeURI(final Request request) throws Exception {
String uri = request.getDecodedRequestURI();
if (uri.contains("..")) {
return null;
}
final String resourcesContextPath = request.getContextPath();
if (resourcesContextPath != null && !resourcesContextPath.isEmpty()) {
if (!uri.startsWith(resourcesContextPath)) {
return null;
}
uri = uri.substring(resourcesContextPath.length());
}
return uri;
}
代码示例来源:origin: org.glassfish.main.web/web-core
/**
* Gets the decoded request URI.
*
* @param maskDefaultContextMapping true if the fact that a request
* received at the root context was mapped to a default-web-module will
* be masked, false otherwise
*/
public String getDecodedRequestURI(boolean maskDefaultContextMapping) {
try {
if (maskDefaultContextMapping || !isDefaultContext) {
return coyoteRequest.getDecodedRequestURI();
} else {
return getContextPath() + coyoteRequest.getDecodedRequestURI();
}
} catch (CharConversionException e) {
throw new RuntimeException(e.getMessage(), e);
}
}
代码示例来源:origin: com.conveyal/osm-lib
String uri = request.getDecodedRequestURI();
int suffixIndex = uri.lastIndexOf('.');
String fileType = uri.substring(suffixIndex);
代码示例来源:origin: javaee/grizzly
String relativePath = request.getDecodedRequestURI();
final int pos = relativePath.lastIndexOf('/');
relativePath = relativePath.substring(0, pos);
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server
String relativePath = request.getDecodedRequestURI();
final int pos = relativePath.lastIndexOf('/');
relativePath = relativePath.substring(0, pos);
代码示例来源:origin: javaee/grizzly
final String path = request.getDecodedRequestURI();
代码示例来源:origin: javaee/grizzly
String requestURI = request.getDecodedRequestURI();
logger.debug("OSGiResourceHandler requestURI: " + requestURI);
String path = requestURI.replaceFirst(alias, prefix);
代码示例来源:origin: javaee/grizzly
String requestURI = request.getDecodedRequestURI();
logger.debug("OSGiResourceHandler requestURI: " + requestURI);
String path = requestURI.replaceFirst(alias, prefix);
代码示例来源:origin: javaee/grizzly
public void service(Request request, Response response) throws Exception {
boolean invoked = false;
String alias = request.getDecodedRequestURI();
String originalAlias = alias;
logger.debug("Serviceing URI: " + alias);
代码示例来源:origin: javaee/grizzly
public void service(Request request, Response response) throws Exception {
boolean invoked = false;
String alias = request.getDecodedRequestURI();
String originalAlias = alias;
logger.debug("Serviceing URI: " + alias);
内容来源于网络,如有侵权,请联系作者删除!