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>
<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>
相关文章推荐
- iOS开发UI篇—无限轮播(功能完善)
- vue 插件tab选项卡
- iOS开发UI篇—无限轮播(循环展示)
- Vue开发环境搭建
- iOS开发UI篇—无限轮播(新闻数据展示)
- iOS开发UI篇—无限轮播(循环利用)
- iOS开发UI篇—Quartz2D使用(绘制基本图形)
- iOS开发UI篇—Quartz2D(自定义UIImageView控件)
- Allegro PCB Editor 中如何快速放置元件
- UITableView以及ScrollView不能相迎TouchBegin处理
- API Blueprint
- [leetcode] 300. Longest Increasing Subsequence
- Closest Binary Search Tree Value -- LeetCode
- Qt ui界面文件的调用--quiloader
- String,StringBuffer与StringBuilder的区别?
- UIWindow强制切换界面
- PL/SQL 报错:A query with LOB's requires OCI8 mode, but OCI7 mode is used
- 10.EASYUI Slider组件
- 11.EASYUI Combo组件
- 12.EASYUI ComboBox组件