本文整理了Java中org.mortbay.jetty.Request.getServerPort
方法的一些代码示例,展示了Request.getServerPort
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getServerPort
方法的具体详情如下:
包路径:org.mortbay.jetty.Request
类名称:Request
方法名:getServerPort
暂无
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
/**
* By default, we're integral, given we speak SSL. But, if we've been told about an integral
* port, and said port is not our port, then we're not. This allows separation of listeners
* providing INTEGRAL versus CONFIDENTIAL constraints, such as one SSL listener configured to
* require client certs providing CONFIDENTIAL, whereas another SSL listener not requiring
* client certs providing mere INTEGRAL constraints.
*/
public boolean isIntegral(Request request)
{
final int integralPort = getIntegralPort();
return integralPort == 0 || integralPort == request.getServerPort();
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
/**
* By default, we're confidential, given we speak SSL. But, if we've been told about an
* confidential port, and said port is not our port, then we're not. This allows separation of
* listeners providing INTEGRAL versus CONFIDENTIAL constraints, such as one SSL listener
* configured to require client certs providing CONFIDENTIAL, whereas another SSL listener not
* requiring client certs providing mere INTEGRAL constraints.
*/
public boolean isConfidential(Request request)
{
final int confidentialPort = getConfidentialPort();
return confidentialPort == 0 || confidentialPort == request.getServerPort();
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public StringBuffer getRequestURL()
{
StringBuffer url = new StringBuffer(48);
synchronized (url)
{
String scheme = getScheme();
int port = getServerPort();
url.append(scheme);
url.append("://");
url.append(getServerName());
if (_port>0 &&
((scheme.equalsIgnoreCase(URIUtil.HTTP) && port != 80) ||
(scheme.equalsIgnoreCase(URIUtil.HTTPS) && port != 443)))
{
url.append(':');
url.append(_port);
}
url.append(getRequestURI());
return url;
}
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
/**
* Reconstructs the URL the client used to make the request. The returned URL contains a
* protocol, server name, port number, and, but it does not include a path.
* <p>
* Because this method returns a <code>StringBuffer</code>, not a string, you can modify the
* URL easily, for example, to append path and query parameters.
*
* This method is useful for creating redirect messages and for reporting errors.
*
* @return "scheme://host:port"
*/
public StringBuffer getRootURL()
{
StringBuffer url = new StringBuffer(48);
synchronized (url)
{
String scheme = getScheme();
int port = getServerPort();
url.append(scheme);
url.append("://");
url.append(getServerName());
if (port > 0 && ((scheme.equalsIgnoreCase("http") && port != 80) || (scheme.equalsIgnoreCase("https") && port != 443)))
{
url.append(':');
url.append(port);
}
return url;
}
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
request.getScheme() +
"://" + request.getServerName() +
":" + request.getServerPort() +
URIUtil.addPaths(request.getContextPath(),uri));
response.setContentLength(0);
代码示例来源:origin: org.mortbay.jetty/jetty-security
request.getScheme() +
"://" + request.getServerName() +
":" + request.getServerPort() +
URIUtil.addPaths(request.getContextPath(),uri));
response.setContentLength(0);
内容来源于网络,如有侵权,请联系作者删除!