//index.jsp<%@ page contentType="text/html; charset=gb2312" pageEncoding="gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<title>shopping123</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="styles/shoppingstyles.css" rel="text/html;charset=gb2312">
</head><body bgcolor="#ffffFF" leftmargin="0" topmargin="0">
<jsp:useBean id="checklogin" class="dbtest.checkLogin" scope="page"/>
<%
boolean login = checklogin.check(request ,response);
%>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr bgcolor="#990000">
<td height="80" colspan="5"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="120">&nbsp;</td>
<center><td class="caption">Shopping123</td></center>
<td width="200">&nbsp;</td>
</tr>
</table></td></tr>
<tr>
<td width="200" align="center" valign="top">
<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr><td>&nbsp;</td></tr>
</table>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#cccccc">
<form name="form1" method="post" action="/servlet/login">
<tr align="center" bgcolor="#cccccc">
<td height="30" colspan="2" class="deepred">卖场入口</td>
</tr>
<tr>
<td width="50%" height="24" align="center" bgcolor="#ffffFF">会员</td>
<td align="center" bgcolor="#ffffff"><input name="username" type="text" id="username" size="10"></td>
</tr>
<tr>
<td height="24" align="center" bgcolor="#ffffff">密码</td>
<td align="center" bgcolor="#ffffff"><input name="password" type="password" id="password" size="10">
</td>
</tr>
<tr>
<td height="24" align="center" bgcolor="#ffffff"><a href="reg.jsp" target="_blank" class="red">注册</a></td>
<td height="24" align="center" bgcolor="#ffffff"><input type="submit" name="Submit" value="进入"></td>
</tr>
</form>
</table></td>
<td width="1" valign="top" bgcolor="#cccccc"></td>
<td width="400">&nbsp;</td>
</tr>
<tr align="center" bgcolor="#990000">
<td height="60" colspan="5" class="white">copyright&copy;2003 Shopping123</td>
</tr>
</table></body>
</html>

解决方案 »

  1.   

    是没找到文件,jsp文件放置的路径可能不对
      

  2.   

    jsp文件应该放在应用的哪个目录下,大概说说?应用的跟目录下码?
      

  3.   

    是点击“进入按钮”出错的吗?问题应该在
    <form name="form1" method="post" action="/servlet/login">中的action定义
      

  4.   

    我的应用不是在TOMCAT安装的目录下:
    JSP 文件它不会找不到吧!!需要配置JSP文件的映射路径吗?
    不是点击“进入按钮”出错的
    而是打开index.jsp文件就错误啊!!