67,512
社区成员
发帖
与我相关
我的任务
分享
package dao;
import java.io.IOException;
import java.io.Reader;
import com.ibatis.common.resources.Resources;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapClientBuilder;
public abstract class BaseDAO {
public SqlMapClient sqlMapClient;
public BaseDAO() {
try {
Reader reader = Resources.getResourceAsReader("SqlMapConfig.xml");
this.sqlMapClient = SqlMapClientBuilder.buildSqlMapClient(reader);
reader.close();
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
}
}
<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@page import="manager.StudentManager"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>Insert title here</title>
</head>
<body>
<%
StudentManager sm = new StudentManager();
sm.findAll();
%>
</body>
</html>