servlet

来源:互联网 发布:武汉人工智能创业公司 编辑:程序博客网 时间:2024/05/20 17:10
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
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 'myLogin.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>
  <a href="wr.rar">下载</a><br>
  <a href="FileRead?fileName=test.txt">srvlet读取文本文件内容</a><br/>
  使用srvlet处理表单。<br>
   <form action="login.action" method="post">
   用户名:<input type="text" name="user">
  密码:<input type="password" name="pass">
  <input type="submit" value="提交">
   </form>
  </body>
</html>
0 0