¾ÈÃü°¡£¡£¡JSPÁ¬½ÓSQL2000ÎÊÌ⣡
¸÷λ´óÏÀ¾ÈÃü°¡ £¡£¡
¸Õ×°ÁËSQL2000 sp3
ÏëÓÃJSPÁ¬½ÓÊý¾Ý¿âµ«ÊdzöÏÖÎÊÌâÁË
ÎÒÓõÄÊÇJDK6.0+tomcat5.0+SQL2000 SP3+JDBC sp3
ËüÏÔʾµÄÊÇ
javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
ÎÒÔËÐмòµ¥µÄJSP¾Í¿ÉÒÔÔËÐУ¬µ«ÊÇÁ¬½ÓÊý¾Ý¿âµÄ¾Í²»ÐÐ
ÍøÉÏ˵µÄ°ì·¨ÎÒ¶¼ÊÔ¹ýÁË »¹ÊDz»ÐÐ
¸÷λ¾È¾ÈÎÒ°É
ÎÒµÄϵͳÊÇvistaµÄ...
¾ÈÃü°¡ ÔõôûÈË°¡
°Ñ´úÂëÌùÉÏÀ´¿´¿´°É¡£javaÊÇ¿çƽ̨µÄ¡£
òËÆÇý¶¯ÎÊÌ⣬µ¹°üÁËô
<html>
<head>
<title>ÀûÓÃJDBC DriverÁ¬½ÓSQL Server 2000Êý¾Ý¿â</title>
</head>
<%@ page contentType="text/html;charset=GB2312"%>
<%@ page language="java" import="java.sql.* "%>
<center>
<h1>ÀûÓÃJDBC DriverÁ¬½ÓSQL Server 2000Êý¾Ý¿â</h1>
</center>
<table>
<tr>
<td>Óû§ID</td>
<td>ÐÕÃû</td>
<td>ÄêÁä</td>
<td>Óʼþ</td>
<td>µØÖ·</td>
</tr>
</table>
<% /*¼ÓÔØJDBC Driver*/
java.lang.Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
Ïà¹ØÎÊ´ð£º
ÎÒÓжà¸ö±íA B C ½á¹¹ÊÇÒ»ÑùµÄ£¬¶¼ÓÐ2¸ö×Ö¶ÎnameºÍcontent,ÎÒÒªËÑË÷ËùÒÔ±íËùÓÐ×Ö¶ÎÖаüº¬¡°Öйú¡±µÄÄÚÈÝ Õâ¸öSQLÓï¾äÔõôд
ÈçºÎ½«¶à¸ö±íµÄ²éѯ½á¹ûÁ¬³ÉÒ»¸ö±í Õâ¸öSQLÓï¾äÔõôд ±íµÄ½á¹¹ÊÇÒ»ÑùµÄ
ÀýÈç£ ......
ÎÒÔÚʹÓÿªÔ´µÄJXL ³öEXCEL±¨±íʱÓöµ½ÕâÑùµÄÎÊÌâ¡£
ÎÒÏë³öµÄÎļþÃû³ÆÊÇÕâÑùµÄ£ºÀý£ºtest_ÀîÇ¿.xls
´úÂëÊÇ ....test_+"UserID"+".xls";
µ«ÊÇ¿ØÖÆ̨ÎÒ¿´µ½µÄÊä³öÃû³ÆЧ¹ûÊÇ£ºtest_µ ......
ÎҵĿª·¢µÄƽ̨ÊÇMyeclipes6.0 + tomcat5.x + mysql
ÎÒËùÓеıàÂ뷽ʽ¶¼ÊÇÓõÄUTF-8
ÎÒÖ»ÓÃÁËStrtus¿ò¼Ü
ÔÚÒ»¸öformÖÐÈçÏÂÓõÄÊÇpostµÄÌá½»·½Ê½£º
<form class="form" action=&quo ......
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
//Óÿͻ§µÄsessionµÄid½¨Á¢Ò»¸öÁÙʱÎļþ£º
//String tempFileName=(String)session.getId();
String tempFileName = (String)session.getId();
//out.println(& ......