<jsp:usebean id="bean" scope="page" class="Mybean.Mybean.Beandb"/> 包名不对
解决方案 »
- Spring+hibernate怎么批量保存
- [求助]页面一跳转就报错 .
- 谁有mysql+hibernate+struts+jsp的相关资料?
- JAVA如何从数据库中取数据显示在EXCEL上?分不够再给
- 请教高手一个分页的算法!!!!!!!!!!!!!!
- 两个整数相除得到百分数,应该怎么做呀? 在线等
- 无效的游标状态,这是为什么啊!!!
- spring+struts+hibernate事务配置问题
- 为什么老提示StandardHost[localhost]: MAPPING configuration error for request URI
- 去ServletContext中的数据为null
- spring+hibernate+struts开发出现了个问题org.springframework.transaction.UnexpectedRollbackException
- 实现代码例如事务经典的那个例题:2个事务并发,一个事务将余额1000减去100,另一个加一百,可以得到结果是1100(900)或1000的那中情况
发帖的时候用插入源代码功能
另外把异常贴出来才好分析package Mybean.Mybean;
import java.sql.*;
public class Beandb{
public String strsql;
public ResultSet rs=null;
public Connection conn;
public Statement stmt; public void setConn()throws Exception{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con;
con=DriverManager.getConnection("jdbc:odbc:web");
Statement stmt1=con.createStatement();
this.conn=con;
this.stmt=stmt1;
}
public ResultSet getResult(String sql){
this.strsql=sql; try{ rs=stmt.executeQuery(strsql);
}
catch(Exception e){
System.out.print(e);
}
return rs;
}
public boolean getsqlQuery(String sql){
this.strsql=sql; try{ stmt.executeUpdate(strsql);
stmt.close();
return true;
}
catch(Exception e){
System.out.print(e);
return false;
}
}
}