shins****@users*****
shins****@users*****
2006年 3月 27日 (月) 20:33:47 JST
Update of /cvsroot/jetspeed-japan/jetspeed-2-trans/ja/xdocs/guides In directory sf-cvs:/tmp/cvs-serv17890/ja/xdocs/guides Modified Files: guide-simple-portlet.xml Log Message: submitted by KATOH Yasufumi jetspeed-2-trans/ja/xdocs/guides/guide-simple-portlet.xml 1.1.1.1 -> 1.2 (modified) http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/jetspeed-japan/jetspeed-2-trans/ja/xdocs/guides/guide-simple-portlet.xml.diff?r1=1.1.1.1&r2=1.2 =================================================================== RCS file: jetspeed-2-trans/ja/xdocs/guides/guide-simple-portlet.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- guide-simple-portlet.xml 2005/12/16 03:43:36 1.1.1.1 +++ guide-simple-portlet.xml 2006/03/27 11:33:47 1.2 @@ -1,138 +1,249 @@ -<?xml version="1.0"?> -<!-- - Copyright 2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<document> - <properties> - <title>Jetspeed Simple Portlet Guide</title> - <subtitle>Documentation for Creating a Simple Portlet</subtitle> - <authors> - <person name="David Le Strat" email="dlest****@apach*****" /> - </authors> - </properties> - <body> - <section name="Jetspeed Simple Portlet Guide"> - <p> - This guide provides a tutorial for creating a very - simple portlet. Portlets developers should follow the - steps below. - </p> - <subsection name="1. The Portlet Class"> - <p> - Create the file Simplest.java in a directory called - simplest/WEB-INF/classes: - <source> -public class Simplest extends javax.portlet.GenericPortlet -{ - public void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) - throws javax.portlet.PortletException, java.io.IOException - { - response.setContentType("text/html"); - response.getWriter().println("A very simple portlet."); - } -} - </source> - </p> - <p> - Compile the class using the command, - <source> -javac -cp ~/.maven/repository/org.apache.portals.jetspeed-2/jars/portlet-api-1.0.jar Simplest.java - </source> - </p> - </subsection> - <subsection name="2. The portlet.xml"> - <p> - Create the file portlet.xml in the simplest/WEB-INF directory. - <source><![CDATA[ -<?xml version="1.0" encoding="UTF-8"?> -<portlet-app id="simplest" version="1.0"> - <portlet id="Simplest"> - <portlet-name>Simplest</portlet-name> - <display-name>Simple Display Name</display-name> - <portlet-class>Simplest</portlet-class> - <supports> - <mime-type>text/html</mime-type> - <portlet-mode>VIEW</portlet-mode> - </supports> - <supported-locale>en</supported-locale> - <portlet-info> - <title>Simple Title</title> - <short-title>The world's simplest portlet</short-title> - </portlet-info> - </portlet> -</portlet-app>]]> - </source> - </p> - </subsection> - <subsection name="3. The web.xml"> - <p> - Create the file web.xml in the simplest WEB-INF directory. - <source><![CDATA[ -<?xml version="1.0" encoding="UTF-8"?> -<!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> - <display-name>Simplest</display-name> - <description>The world's simplest portlet</description> -</web-app>]]> - </source> - </p> - </subsection> - <subsection name="4. The PSML"> - <p> - Create the file simplest.psml in the src/webapp/WEB-INF/pages directory of your Jetspeed Portal. - The portlet-app id and the portlet-name are combined to identify the portlet fragment. Rebuild your portal. - <source><![CDATA[ -page> - <defaults - skin="orange" - layout-decorator="tigris" - portlet-decorator="tigris" - /> - <title>The simplest portlet in the world</title> - <metadata name="title" xml:lang="fr">La plus simple portlet du monde</metadata> - - <fragment id="simplest" type="layout" name="jetspeed-layouts::VelocityTwoColumns"> - <fragment id="simplest-1" type="portlet" name="simplest::Simplest"> - <property layout="TwoColumns" name="row" value="0" /> - <property layout="TwoColumns" name="column" value="0" /> - </fragment> - </fragment> - - <security-constraints> - <security-constraints-ref>public-view</security-constraints-ref> - </security-constraints> -</page>]]> - </source> - </p> - </subsection> - <subsection name="5. The WAR file"> - <p> - From the directory simplest combine the files above into a war file using the command, - <source> -jar cvf ../simplest.war . - </source> - </p> - </subsection> - <subsection name="6. Deploy the WAR file"> - <p> - Copy the war file to <code>$CATALINA_HOME/webapps/jetspeed/WEB-INF/deploy</code>. Jetspeed-2 - will deploy the webapp. Access the page in your navigator - <code>http://localhost:8080/jetspeed/portal/simplest.psml</code>. - </p> - </subsection> - </section> - </body> -</document> \ No newline at end of file +<?xml version="1.0"?> +<!-- + Copyright 2004 The Apache Software Foundation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<document> + <properties> + <title>[Jetspeed Simple Portlet Guide] Jetspeed で動かす簡単なポートレットのガイド</title> + <subtitle>[Documentation for Creating a Simple Portlet] 簡単なポートレットを作るための文書</subtitle> + <authors> + <person name="David Le Strat" email="dlest****@apach*****" /> + </authors> + <translators> + <person name="加藤泰文" email="karma****@prog*****" /> + </translators> + </properties> + <body> + <section name="[Jetspeed Simple Portlet Guide] Jetspeed で動かす簡単なポートレットのガイド"> + <div class="original"> + <p> + This guide provides a tutorial for creating a very + simple portlet. Portlets developers should follow the + steps below. + </p> + </div> + <p> + このガイドは、とても簡単なポートレットを作成するためのチュートリアルです。ポートレットの開発者は以下のような順序で開発を行います。 + </p> + <subsection name="[1. The Portlet Class] 1. ポートレットクラス"> + <div class="original"> + <p> + Create the file Simplest.java in a directory called + simplest/WEB-INF/classes: + <source> +public class Simplest extends javax.portlet.GenericPortlet +{ + public void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) + throws javax.portlet.PortletException, java.io.IOException + { + response.setContentType("text/html"); + response.getWriter().println("A very simple portlet."); + } +} + </source> + </p> + </div> + <p> + simplest/WEB-INF/classes ディレクトリに Simplest.java というファイルを以下のように作成してください。 + <source> +public class Simplest extends javax.portlet.GenericPortlet +{ + public void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) + throws javax.portlet.PortletException, java.io.IOException + { + response.setContentType("text/html"); + response.getWriter().println("A very simple portlet."); + } +} + </source> + </p> + <div class="original"> + <p> + Compile the class using the command, + <source> +javac -cp ~/.maven/repository/org.apache.portals.jetspeed-2/jars/portlet-api-1.0.jar Simplest.java + </source> + </p> + </div> + <p> + 以下のようにコマンドを入力してクラスをコンパイルしてください。 + <source> +javac -cp ~/.maven/repository/org.apache.portals.jetspeed-2/jars/portlet-api-1.0.jar Simplest.java + </source> + </p> + </subsection> + <subsection name="[2. The portlet.xml] 2. portlet.xml"> + <div class="original"> + <p> + Create the file portlet.xml in the simplest/WEB-INF directory. + <source><![CDATA[ +<?xml version="1.0" encoding="UTF-8"?> +<portlet-app id="simplest" version="1.0"> + <portlet id="Simplest"> + <portlet-name>Simplest</portlet-name> + <display-name>Simple Display Name</display-name> + <portlet-class>Simplest</portlet-class> + <supports> + <mime-type>text/html</mime-type> + <portlet-mode>VIEW</portlet-mode> + </supports> + <supported-locale>en</supported-locale> + <portlet-info> + <title>Simple Title</title> + <short-title>The world's simplest portlet</short-title> + </portlet-info> + </portlet> +</portlet-app>]]> + </source> + </p> + </div> + <p> + simplest/WEB-INF ディレクトリに portlet.xml ファイルを作成してください。 + <source><![CDATA[ +<?xml version="1.0" encoding="UTF-8"?> +<portlet-app id="simplest" version="1.0"> + <portlet id="Simplest"> + <portlet-name>Simplest</portlet-name> + <display-name>Simple Display Name</display-name> + <portlet-class>Simplest</portlet-class> + <supports> + <mime-type>text/html</mime-type> + <portlet-mode>VIEW</portlet-mode> + </supports> + <supported-locale>en</supported-locale> + <portlet-info> + <title>Simple Title</title> + <short-title>The world's simplest portlet</short-title> + </portlet-info> + </portlet> +</portlet-app>]]> + </source> + </p> + </subsection> + <subsection name="[3. The web.xml] 3. web.xml"> + <div class="original"> + <p> + Create the file web.xml in the simplest WEB-INF directory. + <source><![CDATA[ +<?xml version="1.0" encoding="UTF-8"?> +<!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> + <display-name>Simplest</display-name> + <description>The world's simplest portlet</description> +</web-app>]]> + </source> + </p> + </div> + <p> + simplest/WEB-INF ディレクトリに web.xml ファイルを作成してください。 + <source><![CDATA[ +<?xml version="1.0" encoding="UTF-8"?> +<!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> + <display-name>Simplest</display-name> + <description>The world's simplest portlet</description> +</web-app>]]> + </source> + </p> + </subsection> + <subsection name="[4. The PSML] 4. PSML ファイル"> + <div class="original"> + <p> + Create the file simplest.psml in the src/webapp/WEB-INF/pages directory of your Jetspeed Portal. + The portlet-app id and the portlet-name are combined to identify the portlet fragment. Rebuild your portal. + <source><![CDATA[ +page> + <defaults + skin="orange" + layout-decorator="tigris" + portlet-decorator="tigris" + /> + <title>The simplest portlet in the world</title> + <metadata name="title" xml:lang="fr">La plus simple portlet du monde</metadata> + + <fragment id="simplest" type="layout" name="jetspeed-layouts::VelocityTwoColumns"> + <fragment id="simplest-1" type="portlet" name="simplest::Simplest"> + <property layout="TwoColumns" name="row" value="0" /> + <property layout="TwoColumns" name="column" value="0" /> + </fragment> + </fragment> + + <security-constraints> + <security-constraints-ref>public-view</security-constraints-ref> + </security-constraints> +</page>]]> + </source> + </p> + </div> + <p> + あなたの Jetspeed ポータルディレクトリ以下の src/webapp/WEB-INF/pages ディレクトリに simplest.psml ファイルを作成してください。portlet-app id と portlet-name はポートレットフラグメントを特定するために結合されます。あなたのポータルをリビルドしてください。 + <source><![CDATA[ +<page> + <defaults + skin="orange" + layout-decorator="tigris" + portlet-decorator="tigris" + /> + <title>The simplest portlet in the world</title> + <metadata name="title" xml:lang="fr">La plus simple portlet du monde</metadata> + + <fragment id="simplest" type="layout" name="jetspeed-layouts::VelocityTwoColumns"> + <fragment id="simplest-1" type="portlet" name="simplest::Simplest"> + <property layout="TwoColumns" name="row" value="0" /> + <property layout="TwoColumns" name="column" value="0" /> + </fragment> + </fragment> + + <security-constraints> + <security-constraints-ref>public-view</security-constraints-ref> + </security-constraints> +</page>]]> + </source> + </p> + </subsection> + <subsection name="[5. The WAR file] 5. WAR ファイル"> + <div class="original"> + <p> + From the directory simplest combine the files above into a war file using the command, + <source> +jar cvf ../simplest.war . + </source> + </p> + </div> + <p> + simplest ディレクトリで、以下のようなコマンドを実行して、以上のファイルを war ファイルにまとめてください。 + <source> +jar cvf ../simplest.war . + </source> + </p> + </subsection> + <subsection name="[6. Deploy the WAR file] 6. WAR ファイルの配備"> + <div class="original"> + <p> + Copy the war file to <code>$CATALINA_HOME/webapps/jetspeed/WEB-INF/deploy</code>. Jetspeed-2 + will deploy the webapp. Access the page in your navigator + <code>http://localhost:8080/jetspeed/portal/simplest.psml</code>. + </p> + </div> + <p> + war ファイルを <code>$CATALINA_HOME/webapps/jetspeed/WEB-INF/deploy</code> にコピーしてください。Jetspeed 2 は webapp を配備します。ブラウザで + <code>http://localhost:8080/jetspeed/portal/simplest.psml</code> にアクセスしてください。 + </p> + </subsection> + </section> + </body> +</document>