把源代码贴出来看一下,可能的原因是你提交的类型跟
接收的类型不同.(GET和POST)

解决方案 »

  1.   

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>正在登录...</title>
    <link href="../css/phoenixtv.css" rel="stylesheet" type="text/css">
    </head><body>
    <%
    String uid = request.getParameter("uid").trim();
    String pwd = request.getParameter("pwd").trim();
    String sql = "select * from user where uid ='"+uid+"' and pwd = '"+pwd"'";
    ResultSet rs = db.executeQuery(sql);
    if(rs.next()){
    rs.close();
    session.setAttribute("uid",uid);
    response.sendRedirect("../index3.jsp"); 
    }else{
    rs.close();
    %>
    <p class="a07">对不起,您的输入有误。<a href="javascript:history.back();" class="a09">请重新登录</a>。 
    <%}%>
    </body>
    </html>
      

  2.   

    session.setAttribute("uid",uid);这句有问题。
      

  3.   

    <table width="100%" border="0">
            <tr> 
              <td height="73"> 
                <form name="form1" method="post" action="data/login.jsp">
                  <div align="center"><span class="p">用户名 
                    <input name="uid" type="text" id="uid" size="10">
                    <br>
                    <br>
                    密&nbsp;&nbsp;&nbsp;码 
                    <input name="pwd" type="password" id="pwd" size="10">
                    <br>
                    </span><br>
                    <input type="submit" name="Submit" value="提交">
                    &nbsp; 
                    <input type="reset" name="Submit2" value="重置">
                  </div>
                </form></td>
            </tr>
          </table>
      

  4.   

    把 method="post" 去掉不出错了。但是却显示出login.jsp文件所在文件夹的目录:Directory of /sw/data/
    find.jsp 
    login.jsp 为什么?