易截截图软件、单文件、免安装、纯绿色、仅160KB

jsp登录 - Web 开发 / JavaScript

我用的是MyEclipse 跟 mysql,我数据库连成功了,但是当我登陆的时候,却不能成功, 
在class file editor里出现这种错误, 
source not found 
the jar file javax.servlet.jar has no source attachment..You can attach the source by clickig Attach Souce below: 
望高手指点!!!  

source not found javax.servlet.jar楼主这个应该是你导入的项目,用的不是你自己本机的tomcat,把项目中的tomcat删除,引用改成你自己的tomcat路径就可以了

没太看明白楼主的意思!

这是在user.java中的判断用户名和密码的
//验证用户名和密码是否正确
public boolean user_valid()
{
this.strSql="select UserID,UserName from `users` ";
this.strSql=this.strSql + " where UserName='" + this.UserName + "'";
this.strSql=this.strSql + " and UserPassword='"+ this.UserPassword + "'";  

try
{
ResultSet rs = super.exeSqlQuery(this.strSql); 
if (rs.next())
{
this.UserID=rs.getLong("UserID");
this.UserName=rs.getString("UserName");
return true;
}
else
{  
return false;
}
}
catch(Exception ex)
{  
return false;
}  
}
在user_login_check.jsp中
<%

//request.setCharacterEncoding("gb2312");
//获取用户名和密码<


相关问答:

jsp链接sql2000的疑问?



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......

jsp中显示菜单(递归)

问题描述:

    例如我要显示的内容如下所示

一级目录1
    一级目录1子类1
        子类1
    一级目录1子类2
      ......

jsp和tomcat问题,快疯了 - Java / Java EE

我写了个jsp页面,然后改动了一下,改动的内容就是在jsp页面的js函数里加了个alert()语句,但是我访问这个页面时,死活都是原来页面的内容,我加了很多alert函数还是没改动前的页面内容;tomcat重启了,也重新部署这 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号