http://www.csdn.net/expert/topic/802/802977.xml?temp=6.121463E-02
解决方案 »
- 怎样快速找到jsp的web程序的数据库用户名和密码
- 以二进制保存的图片如何从sql server 2008 中读出并显示在页面, 有没有代码的demo?
- spring的部署问题
- validation.xml 显示错误信息 能不能每次只显示一个?
- 求问关于在weblogic中部署web应用的相对路径问题!!!!
- 寻觅好心人!!
- 怎样取出iframe里的内容?
- 如何屏蔽通过敲jsp页面的路径访问页面
- 各位老大,用jsp如何从SYBASE(或其它数据库)中取图片?十分着急! 谢谢!!!谢谢!!!
- IDEA 请求servlet 404
- 如何在JSP网页上屏蔽IE本身的F1等帮助功能??
- href的问题
这个问题很急,请大家多多帮忙。小女子在此先谢过了。
很想结了,但打不开!!请帮忙!!
但是已经在数据库中存在的用户记录,在登陆是总是说没有找到啊,注册时登记的信息正确提交了之后,也不能在数据库中找到啊,我搞了很久,不知道什么原因啊,
不知道是不是和数据源配置有关,我选了验证ID真伪是:使用网络登陆的ID WINDOWS NT认证;<%@ page contentType="text/html;charset=gb2312" %>
<%@ page language="java" import="java.sql.*" %>
<jsp:useBean id="userBean" scope="page" class="WebMail.conn"/><html>
<body><%!
String logname,logpass;
boolean loginAttempt=false;
boolean loginOK=false;
String errorMessage="请登陆";
%>
<%
if(request.getParameterValues("login")!=null&&request.getParameterValues("logname")!=null&&request.getParameterValues("logpass")!=null)
{
loginAttempt=true;
}
else
{
out.println("请输入全部信息");
}
if(loginAttempt)
{
logname=request.getParameter("logname");
logpass=request.getParameter("logpass");
String sql="select * from member where logname='"+logname+"'and password='"+logpass+"'";
out.println(sql);
ResultSet RS=userBean.executeQuery(sql);
try{
if(RS!=null)
{
errorMessage="成功登陆!!";
session.setAttribute("username",logname);
response.sendRedirect("main.jsp");
}
else
{
errorMessage="用户名和密码不对!~!!!";
session.setAttribute("username","");
}
}catch(Exception e)
{}
..............................
............................bean 代码如下:
package WebMail;
import java .sql .*;public class conn
{
String sDBDriver="sun.jdbc.odbc.JbdcOdbcDriver";
String sConnStr="jdbc:odbc:WebMail";
Connection connect=null;
ResultSet rs=null;
public conn(){
try{
Class.forName(sDBDriver);
}catch(java.lang .ClassNotFoundException e){
System.err .println(e.getMessage());
}
}
public ResultSet executeQuery(String sql){
rs=null;
try{
connect=DriverManager.getConnection (sConnStr);
Statement stmt=connect.createStatement ();
rs=stmt.executeQuery (sql);
}catch(SQLException ex){
System.err.println(ex.getMessage ());
}
return rs;
}
}
在B/S软件开发中,为了对美工(页面、HTML)和程序员(程序)进行合理分工,使他们各行其事,互不影响,应该设计一个函数,专门用于将HTML文档读到程序中进行处理,完成后在用程序的输出语句输出页面。
不知JSP中有没有自带函数?
如没有,不知哪位大虾自己写过,可否让小弟学习学习??
拜托拜托……
各位大虾救救我,不然,我就寸步难行了啊!
An error occurred at line: 3 in the jsp file: /index.jspGenerated servlet error:
C:\Apache Tomcat 4.0\work\Standalone\localhost\_\index$jsp.java:73: 找不到类 org.newth.web.notepad.PadInfo。
org.newth.web.notepad.PadInfo info = null;
^
An error occurred at line: 3 in the jsp file: /index.jspGenerated servlet error:
C:\Apache Tomcat 4.0\work\Standalone\localhost\_\index$jsp.java:76: 找不到类 org.newth.web.notepad.PadInfo。
info= (org.newth.web.notepad.PadInfo)
^
An error occurred at line: 3 in the jsp file: /index.jspGenerated servlet error:
C:\Apache Tomcat 4.0\work\Standalone\localhost\_\index$jsp.java:81: 找不到类 org.newth.web.notepad.PadInfo。
info = (org.newth.web.notepad.PadInfo) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "org.newth.web.notepad.PadInfo");
^
An error occurred at line: 5 in the jsp file: /index.jspGenerated servlet error:
C:\Apache Tomcat 4.0\work\Standalone\localhost\_\index$jsp.java:107: 找不到类 org.newth.web.notepad.PadList。
org.newth.web.notepad.PadList padlist = null;
^
An error occurred at line: 5 in the jsp file: /index.jspGenerated servlet error:
C:\Apache Tomcat 4.0\work\Standalone\localhost\_\index$jsp.java:110: 找不到类 org.newth.web.notepad.PadList。
padlist= (org.newth.web.notepad.PadList)
^
An error occurred at line: 5 in the jsp file: /index.jspGenerated servlet error:
C:\Apache Tomcat 4.0\work\Standalone\localhost\_\index$jsp.java:115: 找不到类 org.newth.web.notepad.PadList。
padlist = (org.newth.web.notepad.PadList) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "org.newth.web.notepad.PadList");
^
6 个错误
http://211.157.102.21/expert/topic/1051/1051099.xml?temp=.2756006
http://211.157.102.21/expert/topic/1072/1072716.xml?temp=.3079492
http://211.157.102.21/expert/topic/1071/1071107.xml?temp=.7356226
http://211.157.102.21/expert/topic/1076/1076683.xml?temp=.1663782
http://211.157.102.21/expert/topic/1074/1074845.xml?temp=3.826541E-02
http://211.157.102.21/expert/topic/1077/1077698.xml?temp=.2992212