zoukankan      html  css  js  c++  java
  • 请求相关的一些信息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

  • 相关阅读:
    优秀大整数
    洛谷—— P3908 异或之和
    洛谷—— P1869 愚蠢的组合数
    洛谷—— P1680 奇怪的分组
    洛谷—— P1609 最小回文数
    Something I like
    数学相关
    新博客测试中~
    P3369 【模板】普通平衡树
    2017 11.6 NOIP模拟赛
  • 原文地址:https://www.cnblogs.com/zhangyunlin/p/6168094.html
Copyright © 2011-2022 走看看