幻想小说网 酷文学 深夜书屋 叮当小说网 找小说网 无限小说网 红尘小说网

请求相关的一些信息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

posted on 2009-05-06 20:54  张云临  阅读(128)  评论(0编辑  收藏  举报

导航