您的位置:首页 > 产品设计 > UI/UE

jsp内置对象之request

2016-08-15 09:57 381 查看
request内置对象

<html>

<head>
<base href="<%=basePath%>">

<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>

<body>
提交方式:<%= request.getMethod() %><br>
请求的URL地址:<%= request.getRequestURI() %><br>
协议名称:<%= request.getProtocol() %><br>
客户端请求服务器文件的路径:<%= request.getServletPath() %><br>
URL的查询部分:<%= request.getQueryString() %><br>
服务器的名称:<%= request.getServerName() %><br>
服务器的端口号:<%= request.getServerPort() %><br>
远程客户端的IP地址:<%= request.getRemoteAddr() %><br>
</body>

</html>

                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: