日期:2014-05-16  浏览次数:20619 次

JSP+Servlet+Hibernate+MySQL璐墿鍟嗗煄绯诲垪锛?.杞欢瀹夎锛岀幆澧冮厤缃級

鐜windows XP 锛宩dk7锛坖dk涓寘鍚玧re锛夛紝tomcat6锛孧yEclipes

1 聽 聽瀹夎jdk7锛岀郴缁熺幆澧冨彉閲廝ath锛氳缃甹dk涓媌in鐩綍璺緞銆傛湁Path灏辩洿鎺ユ坊鍔狅紝娌℃湁灏辨柊寤恒€?/p>

2 聽 聽绯荤粺鐜鍙橀噺JAVA_HOME锛氳缃甹dk鐩綍锛堝嵆bin鐩綍鐨勪笂涓€灞傦級锛屽悓涓婏紝鏈夊氨鍚庨潰缂栬緫锛屾病鏈夊氨娣诲姞銆?/p>

娴嬭瘯 寮€濮?杩愯 cmd 杈撳叆java -version锛堟纭樉绀哄垯OK锛塲娉細java鍜?version鏈夌┖鏍肩殑

3 聽 聽瀹夎MyEclipes 鍦╳indows --銆媝reference--銆媕ava--銆媔nstalled JREs 聽鍙宠竟add--銆媠tandard VM 鐐筺ext鈥斻€媎erectory鈥斺€攋dk鐩綍锛岄€夋嫨鑷繁瀹夎鐨刯dk鍖呫€?/p>

4 聽 聽tomcat6锛屽畨瑁呫€傞厤缃幆澧冨彉閲廋ATALINA_HOME锛歵omcat瀹夎璺緞銆傚锛欴:\apache-tomcat-6.0.36

5 聽 聽tomcat鐩綍bin鏂囦欢涓媠tartup.bat鍙屽嚮锛屽惎鍔ㄦ湇鍔″櫒

6 聽 鎵撳紑娴忚鍣ㄨ緭鍏ttp://localhost:8080/ tomcat涓婚〉鏄剧ず鍒欐垚鍔熴€?/p>

7 聽 灏唗omcat宓屽叆鍒癕yEclipes涓細 聽windows -preference -myeclipes -tomcat -tomcat6 -鍙宠竟涓婅竟enable -browns--tomcat瀹夎鐩綍 鐐筧pplay锛涘乏杈圭偣寮€tomcat6 鐐?jdk璁剧疆鎴愯嚜宸辩殑jdk锛沴aunch--run mode锛沺ath涓嶇敤绠°€?/p>

8 聽 MyEclipse鏂板缓web projec璧峰悕eshop

9 聽 閰嶇疆tomcat鐨剆erver.xml锛堟墦寮€tomcat鐩綍锛宑onf鐩綍锛岀紪杈戝櫒鎵撳紑server.xml锛夊湪</host>鍓嶉潰鍔犱笂

<Context path="/eshop" docBase="D:\eshop\WebRoot" reloadable="true"/>

dacBase灏辨槸鏂板缓椤圭洰鐨勯偅涓獁ebRoot鐩綍锛屾垨鑰呭崟鍑籈clipse涓殑webRoot鍛堢幇閫変腑鐘舵€侊紝鍦ㄥ鑸浘鏍囨爮閲屽鎵炬枃浠跺す鍥炬爣锛屾墦寮€瀹冿紝灏辨槸鏂囦欢鎵€鍦ㄧ洰褰曘€?/p>

10 聽鍦╳ebRoot涓嬫柊寤簉eg.jsp锛屽鑸浘鏍囨爮閲屽鎵炬湇鍔″櫒鍥炬爣锛岀偣寮€鍙宠竟灏忕豢鐐癸紝鍚姩tomcat6.x銆?/p>

11 聽鎵撴潵娴忚鍣ㄨ緭鍏ttp://localhost:8080/eshop/reg.jsp 聽濡傛灉鑳芥纭樉绀猴紝OK鍓嶉潰鐨勯厤缃畬鎴愪簡~~~~~

鏅氬畨~~

聽聽