zoukankan      html  css  js  c++  java
  • 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>

  • 相关阅读:
    (十三)网络html查看器
    (十二)handler消息处理机制
    (十一)ANR产生原理
    (十)android 中数据存储与访问——使用SharedPreferences保存数据
    (九)android 中数据存储与访问——保存文件到手机内存
    (八)activity的生命周期
    (七)android 通知对话框,并且监听了返回键,当按下返回键也会创建一个对话框
    (六)采用HTML创建UI
    (五)使用代码创建UI
    (六)代码编写UI
  • 原文地址:https://www.cnblogs.com/fooxer/p/3476941.html
Copyright © 2011-2022 走看看