• Jsp request


    <%@ page language="java" import="java.util.*" pageEncoding="GB18030"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <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">  <!--  <link rel="stylesheet" type="text/css" href="styles.css">  -->   </head>     <body>     <form action="show.jsp" method="post">     <ul style="list-style;none;line-height:30px">           <li>输入用户姓名:    <input type="text" name="name3"/><br/></li>             <li>Selet Sex:             <input name="sex" type="radio" value="Male"/>Man             <input name="sex" type="radio" value="Female" />Female        </li>               <li> selet password question:           <select name="question">             <option value="mother birthday:">Mother birthday:</option>             <option value="Pet name">Pet name</option>                    </select>        </li>        <li>请输入问题答案: <input type="text" name="key"/>  </li>         <li>selet your habit:          <div>            <input name="like" type="checkbox" value="Singing and dancing" />Singing and dancing            <input name="like" type="checkbox" value="surf on the Internet" />urf on the Internet            <input name="like" type="checkbox" value="Climb" />Climb            <input name="like" type="checkbox" value="Reading" />Reading           </div>       </li>        <li><input type="submit" value="Submit"/>                          </ul>                 </form>     <ul style="line-height:24px">       <li>客户使用的协议:<%=request.getProtocol() %></li>       <li>客户端发送请求的方法:<%=request.getMethod() %></li>       <li>客户端请求路径:<%=request.getContextPath() %></li>       <li>客户机IP地址:<%=request.getRemoteAddr() %></li>       <li>客客户机名称:<%=request.getRemoteHost() %></li>       <li>客户机请求端口号:<%=request.getRemotePort() %></li>       <li>接受客户信息的页面:<%=request.getServletPath()%></li>       <li>获取报头中User-Aget值:<%=request.getHeader("user-agent") %></li>       <li>获取报头中Uaccept值:<%=request.getHeader("accept") %></li>       <li>获取报头中Host值:<%=request.getHeader("host") %></li>       <li>获取报头中accept-encoding值:<%=request.getHeader("accept-encoding") %></li>       <li>获取URI:<%=request.getRequestURI() %></i>       <li>获取URL:<%=request.getRequestURL()%></li>                       </ul>     </body> </html>

  • 相关阅读:
    owlsuddimatchmaker安装
    类集
    jsp基本语法
    心得思路记录下
    nyoj517 最小公倍数
    poj1250 Tanning Salon
    poj1686 Lazy Math Instructor
    poj3250 Bad Hair Day
    poj1047 Round and Round We Go
    poj2359 Questions
  • 原文地址:https://www.cnblogs.com/fooxer/p/3476941.html
Copyright © 2020-2023  润新知