日期:2014-05-17  浏览次数:20669 次

jsp在本页实现登陆
<%@ 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 'Shopping.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>
    <table width="683" border="1">
  <tr>
    <td colspan="5">&nbsp;</td>
  </tr>
  <tr>
    <td width="166"> 
      <form action="Admin.jsp" method="post">
        姓名:<input type="text" name="username" width="100px"/>
        密码:<input type="password" name="password" width="100px"/>
        <input type="submit" name="ok" value="登入">
        <input type="reset" value="重置">
      </form>    </td>
    <td width="89"><img src="images/1.jpg" /></td>
    <td width="96"><img src="images/2.jpg" /></td>
    <td width="96"><img src="images/3.jpg" /></td>
    <td width="202">&nbsp;</td>
  </tr>
  <tr>
    <td width="166"></td>
    <td>
    <input type="checkbox" name="inst" value="女士上衣">女式上衣    </td>
    <td> <input type="checkbox" name="inst" value="男士上衣">男士上衣</td>
    <td> <input type="checkbox" name="inst" value="男鞋">男鞋</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td width="166"></td>
    <td width="89"><img src="images/1.jpg" /></td>
    <td width="96"><img src="images/2.jpg" /></td>
    <td width="96"><img src="images/3.jpg" /></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td></td&g