javax.servlet.http.HttpServletRequest的属性

在EL中访问方式: pageContext.request.<propertyname>

authType
 String
 Read
 The name of the authentication scheme protecting the request
 用来保护请求的身份认证方案的名称
 
characterEncoding
 String
 Read
 The request body character encoding, or null if unknown
 请求主体字符编码,如果未知则为null
 
contentLength
 int
 Read
 The request body length, or -1 if unknown
 请求主体长度,如果未知则为-1
 
contentType
 String
 Read
 The request body MIME type
 请求主体的MIME类型
 
contextPath
 String
 Read
 The context path for the request
 请求的环境路径
 
cookies
 javax.servlet.http.Cookie[]
 Read
 The cookies received with the request
 该请求所接收的cookie

locale
 java.util.Locale
 Read
 The client's preferred locale
 客户端的首选场所
 
locales
 java.util.Enumeration
 Read
 A list of all client locales in order of preference
 以优先选择顺序排列的所有客户端场所的列表
 
method
 String
 Read
 The request method (e.g., GET, POST)
 请求方法
 
protocol
 String
 Read
 The protocol name and version, e.g., HTTP/1.1
 协议名称和版本,例如HTTP/1.1
 
remoteAddr
 String
 Read
 The client's IP address
 客户端的IP地址
 
remoteHost
 String
 Read
 The client's hostname or IP address if not known
 客户端的主机名,如果不知道主机名,则为IP地址
 
remoteUser
 String
 Read
 The username used to make the request if the page is protected, otherwise null
 如果页面受到了保护,用来做出请求的用户名,否则为null
 
requestURI
 String
 Read
 The request URI, e.g., /app/page.jsp
 请求URI,例如 /app/page.jsp
 
requestURL
 StringBuffer
 Read
 The request URL, e.g., http://server/app/page.jsp
 请求URL,例如http://server/app/page.jsp
 
scheme
 String
 Read
 The scheme, e.g., http or https
 方案,例如http or https
 
servletPath
 String
 Read
 The context-relative path for the request, e.g., /page.jsp
 请求的环境相关的路径, 例如/page.jsp
 
serverName
 String
 Read
 The name of the server the request was sent to
 请求发送的目标服务器的名称
 
serverPort
 int
 Read
 The port the request was sent to
 请求发送的目标端口
 
secure
 boolean
 Read
 true if the request was made over a secure channel (e.g., SSL)
 如果请求是通过安全信道(例如SSL)发出的,则为true
 
userPrincipal
 java.security.Principal
 Read
 The Principal representing the user making the request if the page is protected, otherwise null
 如果页面受到了保护,表示用户发出请求的Principal,否则为null 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值