2008年9月10日 星期三

使用 Maven 建立自己的 archetype (另一種直接命令列下指令方式)

推文
使用 Maven 建立自己的 archetype (另一種直接命令列下指令方式)
說明:同使用 Maven 建立自己的 archetype 這篇

1. 先建立 Maven Project,我就直接用我上一篇的例子,在 DOS Command 下如
下指令或是透過 Eclipse 建 Maven Project (參考上篇):
mvn archetype:create -DgroupId=tutorial -DartifactId=tutorial
-DarchetypeGroupId=tw -DarchetypeArtifactId=ted-struts2
-DarchetypeVersion=1.0-SNAPSHOT
(其中 archetype:create,新版 Maven 建議 archetype:generate)

2. 切換到專案目錄 turorial,下指令 mvn archetype:create-from-project
依據你的 Project 的目錄結構,它會去猜測需要產生的目錄跟檔案,它會
在這目錄 tutorial 下產生 target/generated-sources/archetype 目錄。

3. 再切換到目錄 cd target/generated-sources/archetype/,下指令
mvn install,這時會在你的 local repository 目錄下產生
C:\Documents and Settings\ted\.m2\archetype-catalog.xml 檔案
內容如下:

<?xml version="1.0" encoding="UTF-8"?>
<archetype-catalog>
<archetypes>
<archetype>
<groupId>tutorial</groupId>
<artifactId>tutorial</artifactId>
<version>1.0-SNAPSHOT</version>
<description>tutorial</description>
</archetype>
</archetypes>
</archetype-catalog>

4. 新增目錄 C:\tmp\archetype,切換到這目錄底下,下指令
mvn archetype:generate -DarchetypeCatalog=local
這段是建立 Maven Project,指定你步驟 3 產生的 local repository
archetype,畫面如下


如你再有新增 local 的 archetype,它會在步驟 3 的檔案
C:\Documents and Settings\ted\.m2\archetype-catalog.xml,再增加新
的 local archetype,畫面就會有 2 個以上的選擇,我們選擇 1 按 enter
如下圖依序輸入各參數值,當然你也可以直接下指令如步驟 1,
mvn archetype:create -DgroupId=test -DartifactId=test
-DarchetypeGroupId=tutorial -DarchetypeArtifactId= tutorial
-DarchetypeVersion=1.0-SNAPSHOT
你就不用有選擇視窗,直接產生你的 Maven Project 了


參考網址
http://maven.apache.org/plugins/maven-archetype-plugin/advanced-u
sage.html

2008年9月2日 星期二

使用 Maven 建立自己的 archetype

推文
使用 Maven 建立自己的 archetype
說明:如果想在開發一個新專案時,就能事先幫我們建立好自己要的雛
型架構(例如 Struts 2),及預先幫我們作好一些相關設定,即可利用
此工具先將我們開專案前的一些基本架構 prototype 及相關檔案預先
建立起來。

1. 寫這篇的原因是因為在網址:
http://struts.apache.org/2.x/docs/ready-set-go.html
Run the Maven Archetype(請參考上面網頁的這項)
Run 了那段命令結果出現下列訊息,
Error creating from archetype,查了結果是因為 remote server 沒這個
archetype,也查其他 remote server 也沒這個檔案
(struts2-archetype-starter-2.0.9-SNAPSHOT.jar),要到 google 才找得
到,最近再上去這 repository remote server
http://people.apache.org/repo/m2-snapshot-repository
已更新到 2.0.11.2-SNAPSHOT 版了,所以它的指令的這段
-DarchetypeVersion=2.0.9-SNAPSHOT 應該要改成
-DarchetypeVersion=2.0.11.2-SNAPSHOT 才可以 RUN,當然也藉這個機會來
介紹一下如何使用 Maven 建立自己的 archetype。

2. 這裡講到的是一般我們會引用以前曾經開發過的 project,因為都會引用一
堆 library,跟一堆有的沒的設定,如果在開發新專案時又會用到類似架構
就不用在重頭來一次,那還得花一些時間,而用 maven 建立自己常用架構
的 archetype 就可以省去我們初始建立專案的工作,當然底下要講的跟如
下圖執行的 maven install 是不太一樣的目的

這個是你開發好你的程式後,讓其他人可引用你的 library,一般會在
pom.xml 裡的內容標籤如下方式引用
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
.
.
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>

雖都安裝進 repository 但我們的目的是要能夠建立專案的雛型架構。


3. 我會以我的這篇 手工打造 Struts 2 應用程式 的例子來當雛型架構,建立
自己的 struts2 archetype。

4. Maven 的安裝請參考
http://maven.apache.org/download.html#Installation
Maven 的使用請參考
http://maven.apache.org/guides/getting-started/maven-in-five-minu
tes.html

5. Eclipse plugin m2eclipse (Maven 的 Eclipse plugin)
請執行 eclipse IDE Menu 的 Help-->SoftWare updates
然後按 Add Site Button 輸入網址
http://m2eclipse.sonatype.org/update/ ,即可安裝 m2eclipse

6. archetype 目錄結構的內容請參考
http://maven.apache.org/guides/introduction/introduction-to-the-s
tandard-directory-layout.html

7. 先了解一下我要建立自己 struts2 archetype 的目錄結構內容,這是要建立自己的 archetype,目錄結構跟步驟 6有些不太一樣

amaven_struts2
|-- pom.xml
`-- src
`-- main
`-- resources
|-- META-INF
| `-- maven
| `--archetype.xml
`-- archetype-resources
|-- pom.xml
`-- src
|-- main
| `-- java
| `-- DataOBJ.java
| `-- ErrorMesg.java
| `-- Search.java
| `-- resources
| `-- struts.xml
| `-- webapp
| `-- WEB-INF
| `-- web.xml
| `-- display.jsp
| `-- error.jsp
| `-- ser.jsp
`-- test
`-- java
`-- SearchTest.java

8. 由步驟 7,我會先建立一個目錄 amaven_struts2,這目錄底下會有 pom.xml
及 src 子目錄,而這目錄的 pom.xml 內容如下(這是你下指令 mvn
install 到 local repository 執行時的 pom.xml 設定):
<project>
<modelVersion>4.0.0</modelVersion>
<!-- 通常會形成你的 package,在 repository 通常會形成目錄 -->
<groupId>tw</groupId>
<!—你的 archetype 名稱在 repository 通常會形成目錄 -->
<artifactId>ted-struts2</artifactId>
<!-- 你的 archetype 版本在 repository 通常會形成目錄 -->
<version>1.0-SNAPSHOT</version>
<!—包裝成 jar 檔 -->
<packaging>jar</packaging>
</project>

所以當你 install 到你的 local repository 時,一般預設在如下的目錄
底下,ted 是我登入電腦的帳號名稱,因此會有底下的檔案

C:\Documents and
Settings\ted\.m2\repository\tw\ted-struts2\1.0-SNAPSHOT\ted-strut
s2-1.0-SNAPSHOT.jar

而另一個 pom.xml 為
amaven_strust2\src\main\resources\archetype-resources\pom.xml
這個 pom.xml 是 prototype pom.xml,這是讓你下指令
mvn archetype:create 時,會在你建這專案原型的目錄下產生一個 pom.xml ,而這個設定檔就是你之後要執行指令(mvn package 等等)時的相關設定檔
這檔案重點內容如下:

<project>
<modelVersion>4.0.0</modelVersion>
<!-- 抓取你下指令時的 groupId,我會舉例為 tutorial -->
<groupId>${groupId}</groupId>

<!-- 我一樣會在下指令時指定為 tutorial -->
<artifactId>${artifactId}</artifactId>

<!-- 包裝成可部署應用程式的 war 檔 -->
<packaging>war</packaging>

<!-- 可以在建立專案時指定版本 -->
<version>${version}</version>

<name>my project</name>
<url>http://www.mycom.tw</url>
<dependencies>
<!-- 會用到 junit 的 library-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>

<!-- 會用到 Struts 2 的 library-->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.0.9</version>
</dependency>

<!-- 會用到 postgresql JDBC 的 library -->
<dependency>
<groupId>postgresql</groupId> <artifactId>postgresql</artifactId>
<version>8.3-603.jdbc4</version>
</dependency>

<!--會用到 Servlet & Jsp 的 library-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>

<!-- 這個 plugin 可以讓我們在 command 直接下
mvn jetty:run 測試我們的應用程式,部署到 Web
Application Server 前可先用此測試,預設 port 為 8080 -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.0.1</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds> </configuration>
</plugin>
</plugins>
</build>
</project>

9. 而檔案
amaven_strust2\src\main\resources\META-INF\maven\archetype.xml
內容如下
<archetype>
<!-- id 跟你的 pom.xml 的 artifactId 值一樣 -->
<id>ted-struts2</id>
<!-- 底下的標籤請參考步驟 6 -->
<sources>
<source>src/main/java/DataOBJ.java</source>
<source>src/main/java/ErrorMesg.java
</source>
<source>src/main/java/Search.java</source>
</sources>
<resources>
<resource>src/main/resources/struts.xml
</resource>
<resource>src/main/webapp/WEB-INF/web.xml
</resource>
<resource>src/main/webapp/display.jsp
</resource>
<resource>src/main/webapp/error.jsp
</resource>
<resource>src/main/webapp/ser.jsp
</resource>
</resources>
<testSources>
<source>src/test/java/SearchTest.java
</source>
</testSources>
</archetype>

檔案 amaven_strust2\src\main\resources\archetype-resources\src\main\we
bapp\WEB-INF\web.xml

amaven_strust2\src\main\resources\archetype-resources\src\main\re
sources\struts.xml
及 source code 請參考我附上的 jar 檔

10. 在 dos command 切換到目錄 amaven_struts2,下指令如下圖

執行完成後你會在你的 amaven_struts2 目錄下會有 target 目錄,而
target 目錄下會有這個檔案 ted-struts2-1.0-SNAPSHOT.jar 以及我們的
local repository 的目錄 C:\Documents and
Settings\ted\.m2\repository\tw\ted-struts2\1.0-SNAPSHOT 下也會有
一樣的檔案 ted-struts2-1.0-SNAPSHOT.jar,我們已成功的將我們自己的
archetype 裝進 local repository 了,那麼如果別人也要用我們的
archetype 該怎麼作呢,很簡單只要給他你的 archetype 這檔案
ted-struts2-1.0-SNAPSHOT.jar,請他下指令裝進他的 local repository
如下圖,我把這檔案 copy 到 C 槽底下,
-DgroupId=tw -DartifactId=myarchetype -Dversion=1.0.0
-Dpackaging=jar 以上參數你可自行指定

執行完成後 local repository 目錄會有
C:\Documents and Settings\ted\.m2\repository\tw\myarchetype\1.0.0\
myarchetype-1.0.0.jar 檔案
別人一樣可以在他電腦裡執行你的 archetype,當然你也可以放到你的網站
讓大家執行(相關資訊就請參考 Maven 網站)。

11. 回到 Eclipse(如未裝 Eclipse plugin m2eclipse 請回到步驟 5),如下圖選
Menu 的 File-->New-->Project

選 Maven 的 Maven Project,按 Next,下一畫面再按 Next,如下圖

如這三個項目都沒你 archetype,我們回到 Menu 的
Windows-->Preferences 如下圖

選 Maven 的 Archetypes,按 Add Local Catalog,選檔案名稱
archetype-catalog.xml,這檔案請自行建立,內容如下

<?xml version="1.0" encoding="UTF-8"?>
<archetype-catalog>
<archetypes>
<archetype>
<groupId>tw</groupId>
<artifactId>ted-struts2</artifactId>
<version>1.0-SNAPSHOT</version>
<description>ted struts2</description>
</archetype>
</archetypes>
</archetype-catalog>

按 OK,再按 OK

12. 我們在重建 Maven Project,重複上面步驟,這時請選擇
Local C:\ archetype-catalog.xml,如下圖

按 Next 如下圖

按 Next 如下圖

輸入 Group Id,Artifact Id,Package,按 Finish,如下圖

我們 Struts 2 的雛型架構就完成了,是不是很方便。

13. 還記得我們在步驟 8 底下有提到 maven-jetty-plugin,我們在
dos command 下指令,建立 ted-struts2 archetype 如下圖

建立完成後,切換到目錄 tutorial,下指令 mvn jetty:run 要下這指令之前請確定你 8080 port 沒被佔用,因為他預設是用 8080 port,
然後再用瀏覽器網址輸入 http://localhost:8080/tutorial

輸入王查詢

即可知測試 OK

14. 當然我們要包成 war 可以部署到應用程式,執行 Maven Package 如下圖

在 target 目錄下會有 tutorial.war 及可部署到應用程式了,如下圖


相關檔案下載

2008年8月29日 星期五

Eclipse Plugin Alveole Studio MVC Web Project 寫 Struts 2 應用程式

推文
使用 Eclipse Plugin Alveole Studio MVC Web Project 寫 Struts 2 應用程式
說明:這篇主要是介紹如何用 Eclipse plugin Alveole寫 Struts2 應用程
式,功能是查詢員工的薪資資料。

1. Eclipse 及 Tomcat 下載以及環境設定,請參考我底下的這篇文章
Eclipse 寫 java Servlet。

2. 打開 Eclipse 選 HelpSoftware Updates 如下圖



按 Add Site 鈕,輸入網址 http://mvcwebproject.sourceforge.net/update/
Eclipse 3.4 Java EE Developers版,只需下載及安裝
Alveole Studio Struts 2 Editor Feature 0.23版
MVCWebProjectHelpFeature Feature 0.23版

3. 成功安裝後會有如下畫面


4. 選 Menu FileNewOther,建立 Dynamic Web Project 如下圖

按 Next

5. Project Name 輸入 amvctest,如下圖

按 Finish

6. 點選剛建立的 project amvctest 按右鍵 NewOther如下圖

如下圖選 Alveole Studio MVC Web Project

按 Next
選剛建立的 amvctest,File Name 輸入 amvc,如下圖

按 Next

按 Next
如下圖,它會 Enable Struts 2 跟 copy Struts 2 的 lib 到如圖那個目錄下

按 Finish

7. 選 amvc.aswp 點兩下,會有如下圖的編輯畫面

選右邊畫面元件 Package,這個元件就好像你流程的一個節點一樣,把它看
成一般目錄即可。

8. 如下圖,輸入 Label 輸入 search,因為我舉的例子跟底下我寫的這篇一樣,
手工打造 Struts2 應用程式,一進入首頁就是查詢畫面,所以我只設一個
節點,如果你查 Alveole Studio MVC Web Project 原網站的 Tutorial 它會有
三個 package,而且說明的很詳細,如果要進一步了解可到底下網址。
http://mvcwebproject.sourceforge.net/

按 OK

9. 我們先建立 java 程式,DataOBJ.java,ErrorMesg.java,Search.java,以及
jsp 程式 display.jsp,error.jsp,ser.jsp,我會附上,直接 copy 或 import 進
來即可,說明就參考這篇 手工打造 Struts2 應用程式 步驟 9 及 13,注意
ser.jsp 程式這行 <s:form action="Search" namespace="/"> 與上一篇多了
namespace。

10. 選右邊的 Edit,點兩下 package search,如下圖

如下圖,點右邊元件 Struts2

Nodel label 輸入 search,Action name 輸入 Search,Action class 選
test.Search,Action method 輸入 Search.java 的 execute,或留空白也可,按
OK。

11. 點右邊元件 Jsp View,如下圖

Label 輸入 search,Jsp Path 輸入 /display.jsp,按 OK。

12. 在點右邊元件 Link,到編輯畫面由 search 按住滑鼠左鍵拉到 search view,
如下圖,底下的畫面的 Link Name輸入 success

按 OK,重複步驟 11 建 error view(Label 輸入 error view ,Jsp Path 輸入
/error.jsp) 及 error Link如下圖


13. 我們在看一下 src 目錄下的 alveole-struts.xml的內容如下圖

剛編輯畫面所建立的流程圖建立了這樣的檔案內容

14. 在改檔案 struts.properties 內容編碼 struts.i18n.encoding=Big5,如下圖


15. web.xml 內容改成如下圖(我會附上檔案)


16. 執行及部署請參考這篇 手工打造 Struts2 應用程式 的步驟 14,15,16。

相關檔案下載

2008年8月28日 星期四

手工打造 Struts 2 應用程式

推文
說明:這篇主要是介紹如何用 Eclipse 寫 Struts 2 應用程式(未使用
Eclipse Struts2 plugin 工具),功能是查詢員工的薪資資料。

1. Eclipse 及 Tomcat 下載以及環境設定,請參考我底下的這篇文章
Eclipse 寫 java Servlet。

2. 請下載 Struts 2.0.11.2,網址如下:
http://apache.cdpa.nsysu.edu.tw/struts/binaries/struts-2.0.11.2-all.zip

3. 用 Eclipse 建立一個 Dynamic Web Project 如下圖

按 Next

4. Project Name 輸入 struts2test,如下圖

按 Finish

5. 將你步驟2下載的 struts-2.0.11.2-all.zip檔案解壓縮,在目錄struts-2.0.11.2\lib
底下,請將 commons-logging-1.0.4.jar,commons-logging-api-1.1.jar,
freemarker-2.3.8.jar,ognl-2.6.11.jar,struts2-core-2.0.11.2.jar,xwork-2.0.5.jar,
以及 JDBC 的 driver(我的資料庫伺服器是 postgresql,請依你的資料庫下載
相關的 JDBC driver) postgresql-8.3-603.jdbc4.jar,複製到專案 struts2test 目錄
WebContent\WEB-INF\lib底下。

6. 如下圖

7. 在 struts2test project 的 src 底下建立 struts.xml 檔案,如下圖

struts.xml 檔案內容如下
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<!-- 底下這行主要是設定編碼,這樣在輸入查詢字串時才不會顯示亂碼 -->
<constant name="struts.i18n.encoding" value="Big5"></constant>
<package name="struts2test" extends="struts-default">
<!-- 底下這行主要是設定 Action class 處理成功或失敗顯示的jsp網頁-->
<action name="Search" class="test.Search">
<result>/display.jsp</result>
<result name="error">/error.jsp</result>
</action>
</package>
</struts>

8. 而我們的 web.xml 如下圖

內容如下:


<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">

<display-name>struts2test</display-name>
<!-- 所有的 request response 藉由過濾器轉到 struts2 來處理 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class> org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- 歡迎首頁 -->
<welcome-file-list>
<welcome-file>ser.jsp</welcome-file>
</welcome-file-list>

</web-app>

9. 在 WebContent 底下建立 ser.jsp,display.jsp,error.jsp 程式,如下圖



重覆這步驟建立 ser.jsp,display.jsp,error.jsp 檔,內容如下

10. ser.jsp 內容如下

<%@ page language="java" contentType="text/html; charset=BIG5"
pageEncoding="BIG5"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<!-- 底下這行宣告 s 開頭為使用 struts 的 tag -->
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=BIG5">
<title>查詢</title>
</head>
<body>
<!-- 底下會產生一個 html 的 form 及 textfield(參數名稱為sertxt),button -->
<s:form action="Search">
<s:textfield label="輸入查詢" name="sertxt"></s:textfield>
<s:submit label="查詢" name="search" value="查詢"></s:submit>
</s:form>
</body>
</html>

11. display.jsp 內容如下

<%@ page language="java" contentType="text/html; charset=BIG5"
pageEncoding="BIG5"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>

</head>
<style>
.dataO {border:0px solid blue;border-collapse:collapse;}
.dataO th{ background-color:#ddd;color:#666;text-align:left;border:1px solid white;padding:5px;}
.dataO td{padding:5px;}
.dataO tr.odd {background-color:#fafbff;}
.dataO tr.even {background-color:#f4f4ff;}
</style>
<body>

<table class="dataO">
<tr>
<th>員編</th>
<th>姓名</th>
<th>部門</th>
<th>薪資</th>
</tr>

<!-- 底下這個標籤主要是透過回圈將 java.util.Collection 類別的物件內容取出,我在
這個例子用了 List(資料庫取出的內容) 及 Vector(針對 errorMessage),底下 value
的值 dataOBJs 是對應到程式 Search.java 裡的變數,id 的值為它的type DataOBJ -->
<s:iterator value="dataOBJs" id="DataOBJ" status="dataO_stat">
<tr class="<s:if test="#dataO_stat.odd ==
true">odd</s:if><s:else>even</s:else>">
<td><s:property value="員編" /></td>
<td><s:property value="姓名" /></td>
<td><s:property value="部門" /></td>
<td><s:property value="薪資" /></td>
</tr>
</s:iterator>
</table>

</body>
</html>

12. error.jsp 內容如下

<%@ page language="java" contentType="text/html; charset=BIG5"
pageEncoding="BIG5"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=BIG5">
<title>錯誤訊息</title>
</head>
<body>
<s:iterator value="vecError" id="ErrorMesg">
錯誤訊息:<s:property value="errormessage" />
</s:iterator>
</body>
</html>

13. 至於 java 的檔案:
Search.java:Action class 主要負責連資料庫搜尋員工資料
DataOBJ.java:放入 List 的員工資料的物件
ErrorMesg.java:當有 exception 時,透過 error.jsp 秀出錯誤訊息
說明請參考附件程式內容
建立 java 程式,如下圖

重覆這步驟建立 DataOBJ.java,ErrorMesg.java,Search.java 檔
14. 執行 project struts2test 按右鍵 Run as  Run on Server 如下圖



輸入王,按查詢鈕,產生如下頁面


15. 還記得我們的 struts.xml 的設定
...
<action name="Search" class="test.Search">
<result>/display.jsp</result>
<result name="error">/error.jsp</result>
</action>
...
我們把資料庫伺服器關掉,試試 exception 時的情形,如下圖

16. 部署應用程式請參考這篇文章 Eclipse3.4+Tomcat6.0.16 寫 java Servlet 的
步驟 20。

參考網址:
http://struts.apache.org/2.x

http://www.roseindia.net

http://www.struts2.org

相關檔案下載