锘??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩激情图片,中文字幕第一区二区,亚洲精选一区二区http://www.aygfsteel.com/DuYang/category/11351.html鎷兼悘鍦ㄧ箒鍗庣殑閮藉競zh-cnMon, 12 Mar 2007 23:18:27 GMTMon, 12 Mar 2007 23:18:27 GMT60- Struts鍏ラ棬瀛︿範(fàn)涔?-閰嶇疆http://www.aygfsteel.com/DuYang/articles/47268.htmlDalston.YoungDalston.YoungSun, 21 May 2006 03:05:00 GMThttp://www.aygfsteel.com/DuYang/articles/47268.htmlhttp://www.aygfsteel.com/DuYang/comments/47268.htmlhttp://www.aygfsteel.com/DuYang/articles/47268.html#Feedback0http://www.aygfsteel.com/DuYang/comments/commentRss/47268.htmlhttp://www.aygfsteel.com/DuYang/services/trackbacks/47268.html聽聽聽 浣滀負(fù)涓涓▼搴忓憳浣犲繀欏誨緱浜嗚ВSTRUTS,鍦ㄤ箣鍓嶉厤緗槸涓涓棶棰橈紝涓囦笀楂樻ゼ浠庡湴璧?鍩虹鏄繚闅?鎵浠ユ垜浠厛寰楄瀹僐UN璧鋒潵錛岀劧鍚庡啀璋堥┚寰″畠^_^!
聽聽聽 閰嶇疆Struts,蹇呴』瑕佷互涓嬬殑鐜鍜屽伐鍏?
聽
聽 . JDK(Java Development Kit)
聽聽聽 鍙互浠?http://java.sun.com/j2se 涓嬭澆鏈鏂扮増鏈?br />聽 . Servlet瀹瑰櫒
聽聽聽 榪欎釜瀹瑰櫒蹇呴』鏀寔Servlet瑙勮寖2.2鐗堟垨鍚庣畫鐨勭増鏈?宸茬粡JavaServer Pages瑙勮寖1.1鎴栬呮洿楂?br />聽 . XML瑙f瀽鍣?br />聽聽聽 鏀寔JAXP 1.1鐗堟垨鑰呭悗緇増.Xerces瑙f瀽鍣ㄦ濂界鍚堟瑕佹眰,鍙互浠?http://xml.apache.org/xerces-j 涓嬭澆
聽 . Xalan XSLT澶勭悊鍣?br />聽聽聽 1.2 鐗堟垨鑰呭悗緇増鏈?娉ㄦ剰,2.0 鐗堝瓨鍦ㄤ竴浜涢棶棰?榪欎釜澶勭悊鍣ㄥ彲浠ユ妸XML鏂囦歡杞崲鎴怘TML鏂囨。.榪欎釜澶勭悊鍣ㄥ寘鍚玐erces瑙f瀽鍣?
聽聽聽 鍙互浠?http://xml.apache.org/xalan-j/index.html 涓嬭澆Xalan .
聽 . JDBC 2.0浠ヤ笂鐨刾ackage .
聽聽聽 鍏蜂綋鐨勯厤緗繃紼?
聽
聽 1. 鏂板緩涓涓猈EB搴旂敤,濡傚湪Tomcat\webapps鐩綍涓嬫柊寤虹珛涓涓?Dalston鐩綍.
聽 2. 灝哠truts涓殑 lib/commons-*.jar 鍜?lib/struts.jar 鏂囦歡copy鍒板簲鐢ㄤ腑鐨凞alston\WEB-INF\lib鐩綍涓?鐒跺悗灝哠truts涓叏閮ㄧ殑鏍囩搴撴弿榪版枃浠?br />聽聽聽聽 (lib/struts-*.tld) copy鍒癉alston\WEB-INF\tld鐩綍涓?.
聽 3. 鍦―alston\WEB-INF涓嬫柊寤虹珛涓涓獁eb.xml鏂囦歡,鍦ㄦ枃浠跺姞鍏ヤ互涓嬬殑鍐呭:
聽 -------------------------------------------------------------------------
聽 web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
聽 PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
聽 "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
<web-app>
聽 <display-name>Struts Blank Application</display-name>
聽
聽 <!-- Standard Action Servlet Configuration (with debugging) -->
聽 <servlet>
聽聽聽 <servlet-name>action</servlet-name>
聽聽聽 <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
聽聽聽聽 <init-param>
聽聽聽聽聽 <param-name>application</param-name>
聽聽聽聽聽 <param-value>ApplicationResources</param-value>
聽聽聽 </init-param>
聽聽聽 <init-param>
聽聽聽聽聽 <param-name>config</param-name>
聽聽聽聽聽 <param-value>/WEB-INF/struts-config.xml</param-value>
聽聽聽 </init-param>
聽聽 聽
聽聽聽 <init-param>
聽聽聽聽聽 <param-name>debug</param-name>
聽聽聽聽聽 <param-value>2</param-value>
聽聽聽 </init-param>
聽聽聽 <init-param>
聽聽聽聽聽 <param-name>detail</param-name>
聽聽聽聽聽 <param-value>2</param-value>
聽聽聽 </init-param>
聽聽聽 <load-on-startup>2</load-on-startup>
聽 </servlet>
聽 <!-- Standard Action Servlet Mapping -->
聽 <servlet-mapping>
聽聽聽 <servlet-name>action</servlet-name>
聽聽聽 <url-pattern>*.do</url-pattern>
聽 </servlet-mapping>
聽 <!-- The Usual Welcome File List -->
聽 <welcome-file-list>
聽聽聽 <welcome-file>index.jsp</welcome-file>
聽 </welcome-file-list>
聽 <!-- Struts Tag Library Descriptors -->
聽 <taglib>
聽聽聽 <taglib-uri>/struts-bean</taglib-uri>
聽聽聽 <taglib-location>/WEB-INF/tld/struts-bean.tld</taglib-location>
聽 </taglib>
聽 <taglib>
聽聽聽 <taglib-uri>/struts-html</taglib-uri>
聽聽聽 <taglib-location>/WEB-INF/tld/struts-html.tld</taglib-location>
聽 </taglib>
聽 <taglib>
聽聽聽 <taglib-uri>/struts-logic</taglib-uri>
聽聽聽 <taglib-location>/WEB-INF/tld/struts-logic.tld</taglib-location>
聽 </taglib>
聽 <taglib>
聽聽聽 <taglib-uri>/struts-nested</taglib-uri>
聽聽聽 <taglib-location>/WEB-INF/tld/struts-nested.tld</taglib-location>
聽 </taglib>
聽 <taglib>
聽聽聽 <taglib-uri>/struts-tiles</taglib-uri>
聽聽聽 <taglib-location>/WEB-INF/tld/struts-tiles.tld</taglib-location>
聽 </taglib>
聽
聽 <taglib>
聽聽聽 <taglib-uri>/struts-template</taglib-uri>
聽聽聽 <taglib-location>/WEB-INF/tld/struts-template.tld</taglib-location>
聽 </taglib>
聽聽 <taglib>
聽聽聽 <taglib-uri>/jstl/c</taglib-uri>
聽聽聽 <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
聽 </taglib>
聽
</web-app>
=================================================================================================
聽 4. 淇敼瀹寃eb.xml鍚?鍦╓EB-INF鐩綍涓柊寤轟竴涓猻truts-config.xml鏂囦歡.struts-config.xml鍐呭濡備笅:
struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE struts-config PUBLIC
聽聽聽聽聽聽聽聽聽 "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
聽聽聽聽聽聽聽聽聽 "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
聽 <struts-config>
聽聽聽聽聽 <form-beans>
聽聽聽聽聽 </form-beans>
聽聽聽聽聽 <global-forwards>
聽聽聽聽聽 </global-forwards>
聽聽聽聽聽 <action-mapping>
聽聽聽聽聽 </action-mapping>
聽 </struts-config>
======================================================================================================
鍋氬畬浠ヤ笂鐨勫伐浣?鎴戜滑灝卞彲浠ユ祴璇曚竴涓嬮厤緗槸鍚︽紜簡.
鍦╓EB-INF 鐩綍涓嬪緩绔嬩竴涓狝pplicationResource.properties 鏂囦歡,澧炲姞涓涓睘鎬?
index.title=Struts Tutorial
鎴戜滑鍐欎竴涓祴璇旿SP鏂囦歡---test.jsp,瀹冪殑浠g爜濡備笅:
test.jsp
<%@ page contentType="text/html;charset=gb2312"%>
<%@ taglib uri="/struts-logic" prefix="logic" %>
<%@ taglib uri="/struts-bean" prefix="bean" %>
<%@ taglib uri="/struts-html" prefix="html" %>
<html:html locale="true">
<head>
<html:base/>
<title>
<bean:message key="index.title"/>
</title>
</head>
<body>
嫻嬭瘯鎴戝垰閰嶇疆鐨凷truts!
</body>
</html:html>
閲嶆柊鍚姩WEB鏈嶅姟鍣?鍦ㄦ祻瑙堝櫒閲岃緭鍏ユ祴璇曟枃浠舵墍鍦ㄥ湴鍧:
http://127.0.0.1:8080/Dalston/test.jsp
濡傛灉閰嶇疆姝g‘閭d箞鍦↖E閲屽氨浼?xì)杈撳?
嫻嬭瘯鎴戝垰閰嶇疆鐨凷truts!
濡傛灉榪欐牱錛岄偅涔堜綘鎴愬姛浜嗭紝浣犲氨鍙互緇х畫楂橀樁淇偧浜?^_^

]]>
主站蜘蛛池模板:
万全县|
平果县|
英德市|
汶川县|
大城县|
临安市|
日照市|
上虞市|
威海市|
罗田县|
正镶白旗|
阳谷县|
封丘县|
大洼县|
镇坪县|
沙坪坝区|
穆棱市|
应用必备|
新化县|
娱乐|
海南省|
喀喇|
明溪县|
双牌县|
文山县|
科尔|
繁峙县|
桐柏县|
阳朔县|
乐业县|
巴楚县|
靖边县|
元谋县|
昌都县|
华蓥市|
扶沟县|
仙游县|
成安县|
汉源县|
通城县|
宣化县|