#topicpath ---- **Strutsって [#ba18e7e8] Jakartaプロジェクトが開発してるオープンソースなWEBアプリケーションフレームワークです。 -ユーザ入力値を抽象化したActionFormクラス -プレゼンテーション層とビジネス層のアダプタとなるActionクラス -アプリケーションの挙動を制御するstruts-config.xmlファイル -htmlタグを表現するタグライブラリ -ロジックをJSPから排除するためのタグライブラリ あたりが特徴的でしょうか。いろいろな商用プロダクトにも採用されていて、たとえばWebSphere5.0の管理コンソールもStrutsで書かれています。 **ダウンロード [#m5e3a744] 2007/11/21現在の最新版は1.3.8のようです。 http://struts.apache.org/download.cgi#struts138 のページからダウンロード可能です。 今回は ftp://ftp.riken.jp/net/apache/struts/binaries/struts-1.3.8-all.zip からダウンロードしました。 **インストール [#x6952c11] 解凍後、 struts-1.3.8/apps/struts-blank-1.3.8.war を使って動的WEBプロジェクトを作成すればよいですね。 ちなみにStrutsのいろいろ便利な機能は struts-cookbook-1.3.8.war を見るととても勉強になりそうです。このサイトにも[[struts-cookbook-1.3.8>http://www.masatom.in/struts-cookbook-1.3.8/]] にあげておきました。 ** とりあえず [#rf490fde] とりあえずやってみます。 ***web.xml [#id7ee387] web.xmlには以下を記述します。 <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <!-- Standard Action Servlet Configuration --> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</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> </web-app> WEB-INF/libには以下のライブラリを置けばOKです。 commons-digester-1.8.jar commons-beanutils-1.7.0.jar commons-chain-1.1.jar antlr-2.7.2.jar commons-logging-1.0.4.jar commons-validator-1.3.1.jar oro-2.0.8.jar struts-core-1.3.8.jar struts-taglib-1.3.8.jar -[[上のモジュールを保存したSubversion>http://www.masatom.in/cgi-bin/viewvc.cgi/trunk/strutsExamples/?root=Others]] -[[上のモジュールを保存したSubversion>http://www.masatom.in/cgi-bin/viewvc.cgi/tags/V1.0.0_20071123_01/strutsExamples/?root=Others]] **コンテンツ一覧 [#j6db3242] #ls2 **関連リンク [#u439f005] -[[Scioworks Caminoのマニュアル:http://www.scioworks.net/camino_doc_jp/manual/index.html]] -[[JavaDoc(日本語訳):http://www.jajakarta.org/struts/struts1.1/documentation/ja/target/api/index.html]] -[[StrutsTIPS:http://muimi.com/j/jakarta/struts/struts2.html]] -http://muimi.com/j/jakarta/struts/struts3.html -[[Apache Struts ウェブアプリケーションフレームワーク:http://www.janit.com/TechnoInf/Java/Struts1.1b3/]] -[[Struts-config.xml(Struts1.1)用のXSLスタイルシート:http://struts.hp.infoseek.co.jp/]] -[[Struts-TECHSCORE->http://www.techscore.com/tech/ApacheJakarta/Struts/index.html]] ---- SIZE(10){[[FrontPage]]}~ SIZE(10){現在のアクセス:&counter;}