JspÁ¬½ÓMSSQL2000µÄÁ½ÖÖ·½·¨
JspÁ¬½ÓMSSQL2000µÄÁ½ÖÖ·½·¨
×î½üÔÚѧϰJSPWeb£¨Tomcat·þÎñÆ÷£©Ó¦Óÿª·¢ºÍ»ùÓÚWeblogicºÍMyelcipseµÄJEE5µÄ¿ª·¢£¬ÔÚѧϰ¹ý³ÌÖÐÉæ¼°µ½Á¬½ÓSQL 2000 Êý¾Ý¿âʱ£¬ÓÉÓÚÈí¼þ»·¾³µÄ²îÒìÐÔºÍһЩ°æ±¾ÎÊÌ⣬»¨Á˺ô󹦷ò²ÅÁ¬ÉÏ£¬ËùÒÔÔÚ´Ë×÷¸ö×ܽᣬϣÍûÄܸø´ó¼ÒһЩ°ïÖú£¬²»ÒªÔÚ»ù±¾µÄ¶«Î÷ÉÏ»¨·ÑÌ«¶àµÄʱ¼ä¡£
·½·¨Ò»£ºÀûÓÃSQL Server 2000 For JDBC Çý¶¯³ÌÐòÁ¬½Ó
ÐèÒªÌõ¼þ£º£¨1£©ÏÂÔØ°²×°SQL Server 2000 For JDBCÇý¶¯³ÌÐò
£¨2£©ÅäÖû·¾³±äÁ¿
£¨3£©Èç¹ûͨ¹ýÇ°Á½²½Á¬²»Éϳ¢ÊÔһϸøSQL Server 2000´ò¸ö²¹¶¡
£¨SQL2000-KB884525-SP4-x86-CHS.EXE£©
¾ßÌå²½Ö裺
£¨1£©´Ó΢ÈíÍøÕ¾http://download.microsoft.comÉÏÏÂÔØÇý¶¯³ÌÐò£ºSQL Server 2000 For JDBC
ÈôÕÒ²»µ½ÔÙÌṩһ¸öÍøÖ·£º
http://download.microsoft.com/download/3/0/f/30ff65d3-a84b-4b8a-a570-27366b2271d8/setup.exe
Jdbc_setup.exe ĬÈϵݲװ·¾¶ÎªC:\Program Files\Microsoft SQL Server 2000 Driver for JDBC£¬°²×°Ä¿Â¼\lib\ϵÄÈý¸öjar ÎļþÊÇJDBC Ö§³ÖSQL Server Êý¾Ý¿âµÄÇý¶¯ºËÐÄ¡£½«ÕâÈý¸öjarÎļþ£¨msbase.jar, mssql-server.jar, msutil.jar£©¸´ÖƵ½TomcatĿ¼ÏµÄcommon\lib×ÓĿ¼¡£
£¨2£©»·¾³ÅäÖãºÔÚ»·¾³±äÁ¿ÖÐÐÂÔöJDBC_HOMEϵͳ»·¾³±äÁ¿£¬ÖµÎªC:\Program Files\Microsoft SQL Server 2000 Driver for JDBC
°ÑSQL Server 2000 For JDBC Çý¶¯³ÌÐò°²×°Ä¿Â¼ÏµÄÈý¸öjarÎļþÌí¼Óµ½»·¾³±äÁ¿CALSSPATHµÄÖµÖУ¬Ä¿µÄÊÇ·ÀÖ¹jspÒ³ÃæÔڱ༹ý³ÌÖлá³öÏÖÕÒ²»µ½sql server driverÀà¿âµÄÎÊÌâ¡£Ìí¼ÓµÄÄÚÈÝÈçÏ£º%JDBC_HOME%\lib\msbase.jar;
%JDBC_HOME%\lib\mssqlserver.jar; %JDBC_HOME%\lib\msutil.jar;
ÖÁ´Ë£¬»ù±¾µÄÅäÖÃÒѾÍê³É£¬ÖØÆôһϻú×Ó£¬ÓÃÄãµÄÀý×Ó²âÊÔ¿´ÊÇ·ñÁ¬½ÓµÃÉÏ£¬Èç¹ûÁ¬²»ÉÏ¿ÉÄÜÊÇÄãµÄÊý¾Ý¿âÐèÒª´ò¸ö²¹¶¡£¬Éý¸ö¼¶¡£
£¨3£©¸øÄãµÄSQL Server 2000´ò¸ö²¹¶¡¡£
ÔÚ´ËÎÒËù´òµÄ²¹¶¡°æ±¾Îª SQL2000-KB884525-SP4-x86-CHS Õâ¸ö¿ÉÒÔÔÚÍøÉÏÕÒµ½¡£
°²×°¹ý³Ì£ºÏÂÔØÖ®ºóË«»÷Ëü£¬½«Ëü½âѹµ½Ò»¸öÅÌ£¨ÈÎÒ⣩£¬È»ºóÔÚÆä½âѹĿ¼˫»÷setup.batÅú´¦ÀíÎļþÀ´´ò²¹¶¡£¬Ö®ºó¸ù¾Ý°²×°³ÌÐòµÄÒýµ¼Íê³É²¹¶¡µÄ°²×°£¨×¢Òâ´Ë¹ý³ÌÓÐÁ½¸´Ñ¡¿òÑ¡Ïîʱ Ö»¹´Ñ¡¡¾Éý¼¶Mcrosoft Search ²¢Ó
Ïà¹ØÎĵµ£º
JSP´æ·ÅÔÚ WEB-INF ¸úwebrootµÄÇø±ð
·ÅÔÚwebrootÏÂÃæ:Óŵ㣬³ÌÐò½á¹¹ÇåÎú£¬±ãÓÚ±àÂëºÍά»¤£»È±µã£¬Òª¼Ó¹ýÂËÆ÷¡£
·ÅÔÚweb-infÏÂÃ棺Óŵ㣬²»ÓùýÂËÆ÷£»È±µã£¬´òÂÒÁ˳ÌÐò½á¹¹£¬±àÂëºÍά»¤Âé·³µã¡£
webrootÆäʵÊÇÒ»¸öÃû×Ö¶øÒÑ£¬ÔÚ²¿ÊðºóÊÇ¿´²»µ½µÄ£¬·ÃÎʵÄʱºòÔÚurlÀï¿Ï¶¨Ò²ÊÇ ......
×î»ù±¾µÄÂÒÂëÎÊÌâ
Õâ¸öÂÒÂëÎÊÌâÊÇ×î¼òµ¥µÄÂÒÂëÎÊÌâ¡£Ò»°ãлá³öÏÖ¡£¾ÍÊÇÒ³Ãæ±àÂë²»Ò»Öµ¼ÖµÄÂÒÂë¡£
Html´úÂ룺
£¼%@ page language="java" pageEncoding="UTF-8"%£¾
£¼%@ page contentType="text/html;charset=iso8859-1"%£¾
£¼html£¾
£¼head£¾
£¼title ......
<%
ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext());
List stafflist = ((StaffDAO)ctx.getBean("StaffDAO")).findAll();
request.setAttribute("stafflist",stafflist);
%> ......
ÓÉÓÚÒª×öÉÏ´« ¾ÍÕÒÁ˸öÀý×Ó Áô×Ųο¼
ÉÏ´«£ºÐèÒªsmartupload×é¼þ
import com.jspsmart.upload.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
/**
* ÉÏ´«¹«¹²Àà,¶ÔSmartUpload½øÐÐÁË·â×°
* ......
±¾Àý×ÓÔÚWindows+Tomcat6(weblogic9.2)+jdk1.6ÏÂÔËÐС£
1£©°²×°ºÃjdk1.6£¬È»ºó°²×°tomcat6.
2£©ÔÚtomcatĿ¼µÄconfĿ¼Ï£¬ÐÞ¸Äserver.xml¡£
±¾Àý×ÓÊÇĬÈÏÅäÖÃÔËÐÐÔÚÐéÄâĿ¼Ï£¬,²¢ÇÒÉÏ´«»ù׼Ŀ¼µÄÎïÀí·¾¶ÔÚµ±Ç°Ó¦ÓÃÏ¡£Çë¸ù¾ÝµÚ3µã£¬ÔÚ¶ÔÓ¦µÄhost½ÚµãÉϼÓÈëÀ¶É«²¿·Ö´úÂë¡£
1£©Èç¹ûÓ¦Óò¿ÊðÔÚÍøÕ¾¸ùĿ¼ ......