我用了以下testMssql.jsp代码:<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,java.io.*"%>
<html>
<body>
以下是从Ms sql server数据库读取的数据:<hr>
<table border=1>
<tr><td>id</td><td>书名</td><td>出版社</td><td>价格</td></tr>
<%! String trans(String chi)
{
               String result = null;
               byte temp [];
               try
               {
                       temp=chi.getBytes("iso-8859-1");
                      result = new String(temp);
                }
                catch(UnsupportedEncodingException e)
                {
                        System.out.println (e.toString());
                }
return result;
}
%>
<%   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
   Connection conn=java.sql.DriverManager.getConnection("jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=jspdev","","");
   Statement stmt=conn.createStatement();
    ResultSet rst=stmt.executeQuery("select * from book;");
    while(rst.next())
    {
    out.println("<tr>");
    out.println("<td>"+trans(rst.getString("bookId"))+"</td>");
    out.println("<td>"+trans(rst.getString("bookName"))+"</td>");
    out.println("<td>"+trans(rst.getString("publisher"))+"</td>");
    out.println("<td>"+rst.getFloat("price")+"</td>");
    out.println("</tr>");
    }
    //关闭连接、释放资源
    rst.close();
    stmt.close();
    conn.close();
    %>    
</table>
</body>
</html>
现在我想连接上一个数据库,可是我打开的界面是
type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception javax.servlet.ServletException: [Microsoft][SQLServer JDBC Driver]Error establishing socket.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.testMssql_jsp._jspService(testMssql_jsp.java:99)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket.
com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
java.sql.DriverManager.getConnection(DriverManager.java:525)
java.sql.DriverManager.getConnection(DriverManager.java:171)
org.apache.jsp.testMssql_jsp._jspService(testMssql_jsp.java:71)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.哪位大虾能给我点指点? 是不是我的URL错误?