乱码问题:     resin对中文的支持很好,几乎不用设置也可以正常显示中文,而在TOMCAT下则需要在JSP页里设置下PAGE属性:<%@ page contentType="text/html; charset=GBK" %>,才可以正常显示中文;在返回值包含中文时,需要在request时设置一下返回字符类型 examples: <%     request.setCharacterEncoding("GBK"); //设置为GB2312也可以     String foo=reques.getParameter("foo"); //假设foo里的值为中文     out.println(foo); //这样outprint就不会出现乱码了 %>
  JDBC连接问题: Resin下只需要在classpath下加好JDBC库即可
     msbase.jar 
     mssqlserver.jar 
     msutil.jar
  而TOMCAT下则需要将这三个文件复制到TOMCAT HOME\common\lib 就可以
  测试JDBC代码:来自http://blog.csdn.net/kanaima/      
jsp文件: 
<%@ page contentType="text/html;charset=gb2312"%>  
<%@ page import="java.sql.*"%>  
<html>  
<body>  
<% 
   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();  
   String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=haiguan";  
   String user="sa";  
   String password="";  
   Connection conn= DriverManager.getConnection(url,user,password);  
   Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);  
   String sql="select * from xt_user";  
   ResultSet rs=stmt.executeQuery(sql);  
   while(rs.next())  
   { 
%>  
       您的第一个字段内容为:<%=rs.getString(1)%>  
       您的第二个字段内容为:<%=rs.getString(2)%>  
<% 
   } 
%>  
<%out.print("数据库操作成功,恭喜你");%>  
<% 
   rs.close();  
   stmt.close();  
   conn.close();  
%>  
</body>  
</html>
  JDBC驱动下载:
  
  
Window操作系统: http://www.uncj.com/upload/files/ms_jdbc_setup.exe  
http://download.microsoft.com/download/3/0/f/30ff65d3-a84b-4b8a-a570-27366b2271d8/setup.exe 
  
Unix操作系统 Mssqlserver.tar  
http://download.microsoft.com/download/3/0/f/30ff65d3-a84b-4b8a-a570-27366b2271d8/mssqlserver.tar
 
  Resin和Tomcat下载URL:
  RESIN:http://www.caucho.com/ TOMCAT:http://www.apache.org  
 
  |