resin2.1.5出现一堆问号:????????°ü ???????à
<%@ page contentType="text/html; charset=GB2312" %>
<%@ page errorPage="indexErrorPage.jsp" %>
<%@ page import="java.sql.*" %>
<%@ page import="javax.sql.*" %>
<%@ page import="javax.naming.*" %>
<%
Context env = (Context) new InitialContext().lookup("java:comp/env");
DataSource source = (DataSource) env.lookup("jdbc/exam");
Connection conn = source.getConnection();
try {
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select name from exam_category");
while (rs.next()) {
out.println(rs.getString(1));
}
} finally {
conn.close();
}
%>
出现一堆问号:????????°ü ???????à
如果去掉<%@ page contentType="text/html; charset=GB2312" %>
反而能正常显示:第一试题包第一分类
为什么?!
我用的resin2.1.5
:(