请求相关的一些信息request_info.jsp

 

 佟强 http://blog.csdn.net/microtong
 OakCMS内容管理系统 http://www.oakcms.cn http://www.oakcms.net

HTML表格默认显示的边框比较难看,这个JSP页面中我们利用CSS修饰了表格的背景、表头单元格的背景和单元格的背景,并设置了表格边框border="0"和单元格间隙cellspacing="1",这样单元格间隙显示了表格背景色,看起来就像表格的边框。

<%@ page language="java" contentType="text/html; charset=GB18030"

    pageEncoding="GB18030"%>

<html>

<head>

<title>用户请求相关的一些信息</title>

<style type="text/css">

table{

  background-color:#CCCCCC;

   font-size:16px;

}

tr{

  height:20px;

  line-height:20px;

}

th{

  background-color:#EEEEEE;

}

td{

  background-color:#FFFFFF;

}

</style>

</head>

<body>

<table width="780" border="0" align="center" cellspacing="1">

<tr align="center">

  <th>项目</th><th>方法</th><th>方法返回值</th>

</tr>

<tr align="center">

  <td>请求的URL</td><td>getRequestURL()</td><td><%=request.getRequestURL()%></td>

</tr>

<tr align="center">

  <td>请求的URI</td><td>getRequestURI()</td><td><%=request.getRequestURI()%></td>

</tr>

<tr align="center">

  <td>查询串</td><td>getQueryString()</td><td><%=request.getQueryString()%></td>

</tr>

<tr align="center">

  <td>服务器域名</td><td>getServerName()</td><td><%=request.getServerName()%></td>

</tr>

<tr align="center">

  <td>服务器端口</td><td>getServerPort()</td><td><%=request.getServerPort()%></td>

</tr>

<tr align="center">

  <td>Web应用虚拟路径</td>
  <td>getContextPath()</td><td><%=request.getContextPath()%></td>

</tr>

<tr align="center">

  <td>请求的服务器IP</td><td>getLocalAddr()</td><td><%=request.getLocalAddr()%></td>

</tr>

<tr align="center">

  <td>客户端的IP</td><td>getRemoteAddr()</td><td><%=request.getRemoteAddr()%></td>

</tr>

<tr align="center">

  <td>客户端语言</td><td>getLocale()</td><td><%=request.getLocale()%></td>

</tr></table>

</body>

</html>

 

 佟强 http://blog.csdn.net/microtong
 OakCMS内容管理系统 http://www.oakcms.cn http://www.oakcms.net

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值