zoukankan      html  css  js  c++  java
  • requestAPP1.jps

    <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="java.util.*"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    请求信息如下:<br>
    请求的方法是:<%=request.getMethod() %>
    <br>
    请求的URI是:<%=request.getRequestURI() %>
    <br>
    请求的协议是:<%=request.getProtocol() %>
    <br>
    接受客户提交信息的页面路径是:<%=request.getServletPath() %>
    <br>
    请求的协议是:<%=request.getProtocol() %>
    <br>
    请求中的查询字符串是:<%=request.getQueryString() %>
    <br>
    请求信息的总长度是:<%=request.getContentLength()%>
    <br>
    服务器名称是:<%=request.getServerName() %>
    <br>
    提供HTTP服务的服务器端口号是:<%=request.getServerPort() %>
    <br>
    客户端机器的名称是:<%=request.getRemoteHost() %>
    <br>
    HTTP头文件中User-Agent的值是:<%=request.getHeader("User-Agent")%>
    <br>
    HTTP头文件中accept的值是:<%=request.getHeader("accept")%>
    <br>
    HTTP头文件中Host的值是:<%=request.getHeader("Host")%>
    <br>
    HTTP头文件中accept-encoding的值是:<%=request.getHeader("accept-encoding")%>
    <br>头名字的一个枚举:
    <% Enumeration enumHead=request.getHeaderNames();
    while(enumHead.hasMoreElements())
    {
    out.println((String)enumHead.nextElement());
    }
    %>
    <br>头文件中指定头名字的全部值的一个枚举:
    <% Enumeration enum_headedValues=request.getHeaders("cookie");
    while(enum_headedValues.hasMoreElements())
    {
    out.println((String)enum_headedValues.nextElement());
    }
    %>

    </body>
    </html>

  • 相关阅读:
    Running ASP.NET Applications in Debian and Ubuntu using XSP and Mono
    .net extjs 封装
    ext direct spring
    install ubuntu tweak on ubuntu lts 10.04,this software is created by zhouding
    redis cookbook
    aptana eclipse plugin install on sts
    ubuntu open folderpath on terminal
    ubuntu install pae for the 32bit system 4g limited issue
    EXT Designer 正式版延长使用脚本
    用 Vagrant 快速建立開發環境
  • 原文地址:https://www.cnblogs.com/meng2/p/7658795.html
Copyright © 2011-2022 走看看