一级菜鸟求助!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

happyharbor 2004-08-11 10:37:09
小弟自己写的程序,运行后提示

HTTP Status 404 - /JspSite/TMP8ekd2adq3.jsp

--------------------------------------------------------------------------------

type Status report

message /JspSite/TMP8ekd2adq3.jsp

description The requested resource (/JspSite/TMP8ekd2adq3.jsp) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/5.0.16



源代码如下,请各们大虾帮助解决
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<%
String Uname=request.getParameter("UsersName");
String Pwd=request.getParameter("Pwd");
String strurl = "jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=EXP1.mdb";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection(strurl);
stmt = conn.createStatement();
rs = stmt.executeQuery("select * from UserTable where uName="+uname+"and upwd="+pwd);
int rowscount=0;
while (rs.next()) {
rowscount++;
}
if(rowscount!=0)
{
Response.Wirte("成功登陆");
}
}else{
Response.Wirte("您的用户名或者密码不正确");
}

rs.close();
stmt.close();
conn.close();
%>
</body>
</html>
...全文
137 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
happyharbor 2004-08-16
  • 打赏
  • 举报
回复
多谢支持
ForumExplorer 2004-08-13
  • 打赏
  • 举报
回复
UP~~~~~~~~
----------------------
《CSDN论坛新助手 CSDN's forum Explorer》
1、更快速的浏览
2、更方便地保存
3、更快捷的收/发短信
下载地址:http://www.seeyou.com.cn/CoolSlob/CSDNExplorer.exe
更多说明:http://community.csdn.net/Expert/TopicView.asp?id=3255966
lonelydavy 2004-08-12
  • 打赏
  • 举报
回复
根本没有找到文件呀,看看tomcat配置的主目录
hbyw618 2004-08-12
  • 打赏
  • 举报
回复
404错误代表找不到文件,看你的链接写对没有?还有服务器的配置正确没有?
langxiaofeng 2004-08-12
  • 打赏
  • 举报
回复
你的配制有问题,....TOMACT
bluesky35 2004-08-12
  • 打赏
  • 举报
回复
JSP文件根本没有执行到,是路径的问题.
JServlet 2004-08-11
  • 打赏
  • 举报
回复
"select * from UserTable where uName='"+uname+"' and upwd='"+pwd"'"
JServlet 2004-08-11
  • 打赏
  • 举报
回复
还有SQL语句引号问题没搞好。
xuyang821225 2004-08-11
  • 打赏
  • 举报
回复
WEB-INF下面有2个文件夹,一个是lib还有一个是classes 还应有个web.xml文件

类文件防在classes下 lib 下放外部引用的包
xuyang821225 2004-08-11
  • 打赏
  • 举报
回复
你的文件位置放对了吗?web.xml文件有吗?
happyharbor 2004-08-11
  • 打赏
  • 举报
回复
顶顶顶
happyharbor 2004-08-11
  • 打赏
  • 举报
回复
再顶
happyharbor 2004-08-11
  • 打赏
  • 举报
回复

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧