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的页面是:
<%@ page language="java" contentType="text/html; charset=gb2312"
%>
<script>
function Save(){
xmlHttp=GetXmlHttpObject()
if(xmlHttp==nul ......
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 52 in the jsp file: /vip_info.jsp
ÕË cannot be resolved
49: <table border="1& ......
比如说DB.class是在包com/zhl/jdbc下的
那么DB.class放在什么地方 如果用<jsp:useBean id="d" class=""/>来引入bean 那么class属性应该怎么写
需不需要像servlet那样还要配置web.xml的& ......
想一些购物网站一样查看商品时点击“查看大图片”就显示一个层将大图片显示出来,请问这个效果怎么做????
做一个弹出层,先隐藏,点击查看大图片后把隐藏样式去掉就出来了
就是做个隐藏的弹出层,然后在点击 ......