资源简介
jsp+servlet+javabean客房管理系统
代码片段和文件信息
package bg.javaBean;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class fjListBean {
public StringBuffer result;
public StringBuffer getResult() {
Connection con;
Statement sql = null;
int fjid=1;
try{
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver“);
}
catch(ClassNotFoundException e){
System.out.println(““+e);
}
StringBuffer resultString=new StringBuffer();
try{
con=DriverManager.getConnection(“jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=D:\\rentfj.mdb“““““);
sql=con.createStatement();
ResultSet rs=sql.executeQuery(“Select * FROM fj“);
resultString.append(““);
resultString.append(““);
resultString.append(““+“编号“+“ “);
resultString.append(““+“楼层“+“ “);
resultString.append(““+“房间名“+“ “);
resultString.append(““+“房间类型“+“ “);
resultString.append(““+“房间价格“+“ “);
resultString.append(““+“几人间“+“ “);
resultString.append(“ “);
while(rs.next())
{
resultString.append(““);
resultString.append(““+rs.getString(1)+“ “);
resultString.append(““+rs.getString(2)+“ “);
resultString.append(““+rs.getString(3)+“ “);
resultString.append(““+rs.getString(4)+“ “);
resultString.append(““+rs.getString(5)+“ “);
resultString.append(““+rs.getString(7)+“ “);
resultString.append(“ “);
fjid=fjid+1;
}
con.close();
}
catch(SQLException el){
}
resultString.append(“
“);
result=resultString;
return result;
}
public void setResult(StringBuffer result) {
this.result = result;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 2675 2011-06-16 20:23 bg\fjList.jsp
....... 1317 2011-06-16 19:19 bg\fjManager.jsp
....... 2156 2011-06-16 19:14 bg\Login.jsp
....... 39 2011-06-16 19:13 bg\me
....... 438 2011-06-16 20:17 bg\rentBad.jsp
....... 2721 2011-06-16 19:47 bg\rentfj.jsp
....... 1290 2011-06-16 19:20 bg\rentfjDetail.jsp
....... 438 2011-06-16 20:17 bg\rentSuccess.jsp
....... 2531 2011-06-16 20:29 bg\returnfj.jsp
....... 2868 2011-06-16 19:14 bg\WEB-INF\classes\bg\javaBean\fjListBean.class
....... 2008 2011-06-16 19:14 bg\WEB-INF\classes\bg\javaBean\fjListBean.java
....... 4488 2011-06-16 19:14 bg\WEB-INF\classes\bg\javaBean\fjManagerBean.class
....... 3170 2011-06-16 19:14 bg\WEB-INF\classes\bg\javaBean\fjManagerBean.java
....... 1272 2011-06-16 19:14 bg\WEB-INF\classes\bg\javaBean\LoginBean.class
....... 667 2011-06-16 19:14 bg\WEB-INF\classes\bg\javaBean\LoginBean.java
....... 3849 2011-06-16 20:17 bg\WEB-INF\classes\bg\javaBean\RentfjDetailBean.class
....... 2798 2011-06-16 20:17 bg\WEB-INF\classes\bg\javaBean\RentfjDetailBean.java
....... 3483 2011-06-16 20:24 bg\WEB-INF\classes\bg\servlet\fjListServlet.class
....... 3121 2011-06-16 20:24 bg\WEB-INF\classes\bg\servlet\fjListServlet.java
....... 4820 2011-06-16 19:14 bg\WEB-INF\classes\bg\servlet\LoginServlet.class
....... 3902 2011-06-16 19:14 bg\WEB-INF\classes\bg\servlet\LoginServlet.java
....... 3386 2011-06-16 19:46 bg\WEB-INF\classes\bg\servlet\RentfjServlet.class
....... 3096 2011-06-16 19:46 bg\WEB-INF\classes\bg\servlet\RentfjServlet.java
....... 3496 2011-06-16 19:37 bg\WEB-INF\classes\bg\servlet\returnfjServlet.class
....... 2789 2011-06-16 19:37 bg\WEB-INF\classes\bg\servlet\returnfjServlet.java
....... 1765 2011-06-16 19:16 bg\WEB-INF\web.xm
目录 0 2011-06-16 19:14 bg\WEB-INF\classes\bg\javaBean
目录 0 2011-06-16 19:14 bg\WEB-INF\classes\bg\servlet
目录 0 2011-06-16 19:14 bg\WEB-INF\classes\bg
目录 0 2011-06-16 19:14 bg\WEB-INF\classes
............此处省略8个文件信息
- 上一篇:swingx-1.6.1.jar
- 下一篇:JSPbook.war
评论
共有 条评论