显然是没有程序在监听1433这个端口
你可以"telnet localhost 1433",试一下。两种可能性
1:数据库没有启动
2:写错端口号

解决方案 »

  1.   

    Connection conn= DriverManager.getConnection(url,"sa","");
      

  2.   

    是你的数据库更本连接不上,有多个原因:
    1、数据库服务器异常或者更本没有启动
    2、网络连接有问题
    3、做过手动设置改变了请求端口
    4、还可能getConnection(url,"sa","")中URL书写错误,用户名密码错误
      

  3.   

    我现在不用weblogic中的驱动,下载了一个微软的sql server jdbc驱动。
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
        String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=enroll";
        String user="sa";
        String password="";
        Connection conn= DriverManager.getConnection(url,user,password);
    配置后页面访问正确。