<?xml version="1.0" encoding="Shift_JIS" ?>

<document>

 <properties>
  <title>Velocity JSP タグライブラリ</title>
  <originaltitle>The Velocity JSP Tag Library</originaltitle>
  <author email="geirm@apache.org">Geir Magnusson Jr.</author>
  <translator>熊坂祐二</translator>
  <translator>高橋達男</translator>
  <translator>新穂洋史</translator>
  <original>veltag</original>
 </properties>

<body>

<section name="Contents" alias="目次">

<primary>
<ol>
<li>
<a href="#So You Have To Use JSP...">So You Have To Use JSP...</a>
<ul>
  <li>
    <a href="#What Are The Advantages">What Are The Advantages?</a>
  </li>
</ul>
</li>

<li>
 <a href="#Using The Velocity Taglib">Using The Velocity Taglib</a>
 <ul>
  <li>
    <a href="#Automatic Scope Access">Automatic Scope Access</a>
  </li>
  <li>
    <a href="#Strict Scope Access">Strict Scope Access</a>
  </li>
</ul>
</li>

<li>
<a href="#Building The Velocity Taglib">Building The Velocity Taglib</a>
<ul>
  <li>
    <a href="#JJAR build">Build Using JJAR</a>
  </li>
  <li>
    <a href="#nonJJAR build">Non-JJAR Traditional Build</a>
  </li>
</ul>
</li>

<li>
<a href="#Configuration">Configuration</a>
</li>
</ol>
</primary>
<ol>
<li>
<a href="#So You Have To Use JSP...">JSPを使わなくてはならないなら・・・</a>
<ul>
  <li>
    <a href="#What Are The Advantages">利点は何?</a>
  </li>
</ul>
</li>

<li>
 <a href="#Using The Velocity Taglib">Velocity タグライブラリを使う</a>
 <ul>
  <li>
    <a href="#Automatic Scope Access">自動スコープアクセス</a>
  </li>
  <li>
    <a href="#Strict Scope Access">厳密スコープアクセス</a>
  </li>
</ul>
</li>

<li>
<a href="#Building The Velocity Taglib">Velocity タグライブラリのビルド</a>
<ul>
  <li>
    <a href="#JJAR build">JJARを使ったビルド</a>
  </li>
  <li>
    <a href="#nonJJAR build">JJARを使わない昔ながらのビルド</a>
  </li>
</ul>
</li>

<li>
<a href="#Configuration">設定</a>
</li>
</ol>

</section>

<section name="So You Have To Use JSP..." alias="JSPを使わなくてはならないなら・・・">

<primary>
<p>
 Sometimes it appears you don't have a choice - technology decisions are 
 made based on all sorts of factors, ranging from network externalities
("They're using it - I should too...") to legacy considerations
("They used it - I have to...").
</p>
</primary>
<p>
時には、選択できないこともあります。技術の決定は、
とても多くの要因に基づいて行われ、その要因は、ネットワークにもとづく外部的なもの
(「彼らが<b>使っている</b>から・・・」)から
過去の資産への配慮 (「彼らが<b>使った</b>から・・・」)まで様々です。
</p>

<primary>
<p>
In the event where the usage of JSP is mandatory, we offer a JSP tag library that lets 
you take advantage of the simple control directives and powerful binding to the
Java object model offered by Velocity.  Using Velocity in your JSPs is as 
simple as :
</p>
</primary>
<p>
JSP を使用せざるを得ない人のために、シンプルな制御指示子や Java
オブジェクトモデルとの強力な結びつきといった Velocity の利点を生かせる
JSP タグライブラリを提供しています。
JSP で Velocity を使うのはこんなに簡単です。
</p>

<source><![CDATA[
<%@ taglib uri="/WEB-INF/veltag.tld" prefix="vel" %>

<html>
<head>
  <title> Velocity! </title>
</head>

<jsp:useBean id="mybean"  class="GeirBean" />

<body>
    <vel:velocity strictaccess="true">

         #set($mybean = $scopetool.getPageScope("mybean"))

         #if(true)
            this is true!
         #end

         <br>

         $mybean.string

         <br>

        #foreach($item in $mybean.array) 
            $item <br>
        #end

    </vel:velocity>
</body>
</html>
]]></source>

<primary>
<p>
Not hard at all, is it?
</p>
</primary>
<p>
すごく簡単でしょ?
</p>

<primary>
<a name="What Are The Advantages"><strong>What Are The Advantages?</strong></a>
</primary>
<a name="What Are The Advantages"><strong>利点は何?</strong></a>

<primary>
<p>
The first question asked when confronted with this subject is something 
along the lines of "What advantage does this have over 'pure' Velocity?".  
Generally, there are few reasons why one would take a Velocity-only 
system, and convert it to a JSP system with Velocity embedded in the 
JSP pages.  The only reason that you might want to do this is to use 
an existing JSP taglib that you want to use that you don't have the 
source code for, or don't wish to dig out the core functional classes 
of a taglib you do have the source for.  Otherwise, you could just drop
those core classes in the Context, and access them directly from within
the Velocity template.
</p>
</primary>
<p>
この話題にとりくむ際に最初に聞かれる質問は、「「純粋な」Velocity と比べて、
どんな利点があるのか？」といったものです。
一般に、Velocity のみのシステムから、JSP ページに Velocity を埋め込んだ
JSP システムに移行しなければならない理由はほとんどありません。
もしそうしたいと思うのなら、その唯一の理由は、
既存の JSP タグライブラリを使いたいのにソースコードがないからか、
ソースはあるがタグライブラリのコア機能のクラスに手を入れたくないからでしょう。
そうでないなら、こうしたコアのクラスをコンテキストに入れて、
Velocity テンプレート内で直接アクセスすれば済むからです。
</p>

<primary>
<p>
The advantages, then, are found in a JSP-centric environment, where an
existing application is already written in JSP and you wish to add or
maintain functionality.  Some things that Velocity provides :
</p>
</primary>
<p>
したがって、このアプローチが役に立つのは、JSP が中心的な環境で、
既存のアプリケーションが JSP で書かれていて、機能を追加・変更したい場合です。
Velocity は以下のような機能を提供します。
</p>

<primary>
<ul>
<li> 
     Simple access to Java objects, without any need to create a taglib
     shell.  If it has public methods on a public interface, you can 
     drop it right into a scope and access directly (or use a tool to 
     create an instances of the class for you.)
</li>
<li> 
     Simple access to complicated Java objects.  It's not clear how to 
     access an arbitrary call chain such as $foo.bar( $thing ).getIterator().hasNext() 
     in JSP.
</li>
<li> 
     Although this is a matter of personal taste, some people prefer the
     control directives of Velocity ( #if(), #else(), #elseif(), #foreach() )
     to the various taglibs that offer the same functionality.
     <i>De gustibus non est disputandum!</i>.
</li>
<li> 
     An easy bridge between complicated Java objects and JSP - for example
     if you wished to dynamically choose/create an object at runtime, and
     then poke into a scope for access in other parts of the JSP, you could
     do that.
     <pre>
         &lt;vel:velocity strictaccess="true"&gt;
             #set($reqbean = $scopetool.getRequestScope("beaninrequest"))
             #set($newthing = $reqbean.getThing().makeBlue("azure"))
             $request.getSession().setAttribute("bluething", $newthing)
         &lt;/vel:velocity&gt;
     </pre>
     Or something like that :)
</li>
<li>
     If nothing else, there are always the Velocimacros.
</li>
</ul>
</primary>
<ul>
<li> 
タグライブラリのシェルを作成しなくても、Java オブジェクトに簡単にアクセスできます。
public インタフェースに public メソッドがあれば、それをスコープにそのまま入れて、
直接アクセスできます（あるいは、自分のクラスのインスタンスを生成するツールも使えます)。
</li>
<li> 
複雑な Java オブジェクトに簡単にアクセスできます。
JSP では $foo.bar( $thing ).getIterator().hasNext() といった、
任意の呼び出し連鎖には簡単にアクセスできません。
</li>
<li>
好みの問題ですが、Velocity の制御指示子 (#if()、#else()、#elseif()、#foreach()) を、
同じ機能のタグライブラリよりも好む人もいます。古代ローマの諺にあるように、
「<i>人の好みについては議論すべきではありません
(De gustibus non est disputandum)</i>」。
</li>
<li> 
複雑な Java オブジェクトから JSP への橋渡しが簡単です -- たとえば、
実行時にオブジェクトを動的に選択/作成して JSP
の他の部分でアクセスできるようにスコープにつっこみたい場合は、こんな風にできます。
     <pre>
         &lt;vel:velocity strictaccess="true"&gt;
             #set($reqbean = $scopetool.getRequestScope("beaninrequest"))
             #set($newthing = $reqbean.getThing().makeBlue("azure"))
             $request.getSession().setAttribute("bluething", $newthing)
         &lt;/vel:velocity&gt;
     </pre>
まあこんな感じです :)
</li>
<li>
何がなくとも、Velocimacro があります。
</li>

</ul>

</section>

<section name="Using The Velocity Taglib" alias="Velocity タグライブラリを使う">

<primary>
<p>
The biggest challenge in bringing together Velocity and JSP is the 
'impedance matching' related to scope and bean access.  'Scope', 
the fundamental storage mechanism in JSP, is a 
concept that comes from the underlying servlet API, where data objects 
are stored for later retrieval within the page, request, session or
application.  Velocity organizes data in a non-hierachical mechanism 
called the 'context', the expectation being that a controller servlet
or other non-view code will manage and organize the data accessable 
to the template.
</p>
</primary>
<p>
Velocity と JSP をまとめる際の最大の問題は、
スコープとBeanアクセスに関する「インピーダンスマッチング」です。
JSP での基本的なデータ格納メカニズムである「スコープ」は、ベースにある Servlet API
から派生した考え方で、データオブジェクトが、
ページ／リクエスト／セッション／アプリケーション内で保存・取得されます。
Velocity は「コンテキスト」と呼ばれる非階層的な仕組みでデータを管理しており、
テンプレートでアクセス可能なデータの管理は、コントローラである
Servlet など、ビュー以外のコードが行うことを前提としています。
</p>

<primary>
<p>
So to make data access in JSPs easy using the Velocity taglib, two 
separate approaches are offered.  These two approaches, automatic
access and strict access, allow two distinct ways of managing and 
accessing data.  These two ways can also be used together.
</p>
</primary>
<p>
したがって、Velocity タグライブラリを使って JSP 内で簡単にデータアクセスするために、
2種類の方法が提供されています。自動アクセスと厳密アクセスという2種類の方法で、
2通りの異なるやり方でのデータの管理やアクセスが可能となっています。
併用も可能です。

</p>

<primary>
<a name="Automatic Scope Access"><strong>Automatic Scope Access</strong></a>
</primary>
<a name="Automatic Scope Access"><strong>自動スコープアクセス</strong></a>

<primary>
<p>
The first way, automatic access, is the most convenient.  When an 
object is referenced (via a VTL 'reference'), the scopes are searched
to find an object with the same id.  The scopes are searched in the 
order of :
</p>
</primary>
<p>
1つ目のやり方である、自動アクセスの方が便利です。
(VTL「リファレンス」を通して) オブジェクトが参照される場合、
同じ ID のオブジェクトを見つけるためにスコープが検索されます。
スコープは以下の順序で検索されます
</p>

<primary>
<ol>
<li> page scope </li>
<li> request scope </li>
<li> session scope </li>
<li> application scope </li>
</ol>
</primary>
<ol>
<li> ページスコープ </li>
<li> リクエストスコープ </li>
<li> セッションスコープ </li>
<li> アプリケーションスコープ </li>
</ol>

<primary>
<p> 
Automatic scope access is enabled by default.  To use 
automatic scope access, just access the bean by name. For example :
</p>
</primary>
<p> 
自動スコープアクセスは、デフォルトで使えます。
自動スコープアクセスを使うには、名前で Bean にアクセスするだけです。
例えば、
</p>

<primary>
<source><![CDATA[
<!-- place a bean in page scope -->
<jsp:useBean id="mybean"  class="GeirBean" />

 <vel:velocity>

    <!-- just access by id - the context -->
    <!-- will find it automatically      -->

    #foreach($item in $mybean.array) 
       $item <br>
    #end

</vel:velocity>
]]></source>
</primary>
<source><![CDATA[
<!-- ページスコープに Bean を設定 -->
<jsp:useBean id="mybean"  class="GeirBean" />

 <vel:velocity>

    <!-- IDでアクセスするだけで、コンテキストは -->
    <!-- 自動的にオブジェクトを見つけてくれます -->

    #foreach($item in $mybean.array) 
       $item <br>
    #end

</vel:velocity>
]]></source>

<primary>
<p>
While automatic scope access is the easier of the two methods, 
integrating with existing applications might require using the
other access mode, strict scope access, or a combination of the
two.
</p>
</primary>
<p>
自動スコープアクセスの方が簡単ですが、既存のアプリケーションと統合するためには、
もう一つのアクセスモードである厳密スコープアクセスを使うか、
あるいは両者を組み合わせて使う必要があるかもしれません。
</p>

<primary>
<a name="Strict Scope Access"><strong>Strict Scope Access</strong></a>
</primary>
<a name="Strict Scope Access"><strong>厳密スコープアクセス</strong></a>

<primary>
  <p>
   The alternative (or addition to) Automatic Scope Access is something called 
   <i>Strict Scope Access</i>.  Strict Scope Acccess means that the Velocity
   Context won't search the scopes for you - you must retrieve objects directly
   using ScopeTool that is provided for your use in the template.  This is a 
   closer model to that of regular JSP, where the designer must be aware of 
   the scopes that objects are stored in.
  </p>
</primary>
  <p>
自動スコープアクセスの代替手段（または追加手段）が、<i>厳密スコープアクセス</i>と呼ばれているものです。
厳密スコープアクセスとはどういうことかというと、Velocity
コンテキストがスコープを検索してくれない 
-- テンプレートで使用するために用意されている ScopeTool を使って、
直接オブジェクトを取り出さなければならない -- ということです。
これは通常の JSP により近いモデルで、
デザイナはオブジェクトがどのスコープに保存されているかを把握しなければなりません。
  </p>

<primary>
   <p>
   For example, the following snippet of JSP shows how the scopetool is used to
   access an object in the request scope, and add it to the Velocity context.
   Note how the <code>strictaccess</code> property is set to true in the
   <code>&lt;vel:velocity strictaccess="true"&gt;</code> tag.  This tells 
   the Veltag taglib to not do any automatic scope searching.  Note that you can
   mix the two modes, leaving off (or setting to false) <code>strictaccess</code>
   and also using the scopetool to eliminate any question about the source
   of an object.
  </p>
</primary>
   <p>
例えば、以下の JSP のコードでは、ScopeTool
を使ってリクエストスコープ内のオブジェクトにアクセスし、
オブジェクトを Velocity コンテキストに追加する方法を示しています。
<code>&lt;vel:velocity strictaccess="true"&gt;</code> タグで、
<code>strictaccess</code> プロパティが true に設定されているのに注目してください。
こうすれば Veltag タグライブラリが自動スコープ検索を行わないようになります。
注意：<code>strictaccess</code> をオフのままにしておき(または false に設定し)、
その上でどこからのオブジェクトかを気にしないですむように ScopeTool を使うことで、
2つのモードの混在も可能です。
  </p>

<source><![CDATA[
<jsp:useBean id="beaninrequest" class="GeirBean" scope="request" />

<vel:velocity strictaccess="true">

         #set($reqbean = $scopetool.getRequestScope("beaninrequest"))

         $reqbean.string

         <br>

        #foreach($item in $reqbean.array) 
            $item <br>
        #end

</vel:velocity>
]]></source>

<primary>
<p>
Again, pretty straightforward.
</p>
</primary>
<p>
こちらも、かなり簡単です。
</p>

</section>

<section name="Building The Velocity Taglib" alias="Velocity タグライブラリのビルド">

<primary>
<p>
To use the Velocity taglib, you need to build it, as it is not 
yet included in the main Velocity jar.  In the Jakarta tradition,
we made it very easy to build.  The code for the project is 
located in the contrib section of the distribution under 
<code>/contrib/temporary/veltag</code>.  It is under the 
temporary directory as it is hoped this package will
be accepted by the 
<a href="http://jakarta.apache.org/taglibs/">Jakarta Taglibs</a>
project.
</p>
</primary>
<p>
Velocity タグライブラリを使う場合、メインの Velocity の
JAR ファイルにはまだ含まれていないので、ビルドする必要があります。
Jakarta での伝統に従い、ビルドを非常に簡単にしました。
このプロジェクトのコードは、配布の contrib セクションの
<code>/contrib/temporary/veltag</code> の下
[<a href="http://cvs.apache.org/viewcvs/jakarta-velocity/contrib/temporary/veltag/">
http://cvs.apache.org/viewcvs/jakarta-velocity/contrib/temporary/veltag/</a>]
に置いてあります。一時的なディレクトリの下にあるのは、このパッケージは
<a href="http://jakarta.apache.org/taglibs/">Jakarta Taglibs</a>
プロジェクトに受け入れられることを希望しているからです。
</p>

<primary>
<a name="JJAR build"><strong>The Easy, JJAR Way</strong></a>
</primary>
<a name="JJAR build"><strong>JJARを使う簡単な方法</strong></a>

<primary>
<p>
The Veltag taglib can be built using a new, <b>experimental</b> 
jar management tool called <em>JJAR</em>
(Jakarta Jar Archive &amp; Repository) which makes finding and retrieving the
dependencies to build the taglib simple.
</p>
</primary>
<p>
Veltag タグライブラリは、新しい<b>実験的な</b> Jar ファイル管理ツールである
<em>JJAR</em> (Jakarta Jar Archive &amp; Repository)
を使ってビルドできます。このツールは、タグライブラリを簡単にビルドできるように、
依存するライブラリを見つけて取り出してくれます。
</p>

<primary>
<p>
 <i>Please note that JJAR is 
currently a work in progress - while every effort will be made to ensure
that the JJAR-based build works, it may not always be so.  In that case, 
do it the regular way, listed below.</i>
</p>
</primary>
<p>
 <i>
注意：JJAR は現在開発中です -- JJAR ベースのビルドが動作するように、
あらゆる努力をしていますが、動作しない可能性もあります。
その場合には、後で示す<a href="#nonJJAR build">一般的な方法</a>で行ってください。
</i>
</p>

<primary>
<p>
To build with JJAR :
</p>
</primary>
<p>
JJAR でビルドする手順は以下の通りです。
</p>

<primary>
<ol>
<li> 
  <a href="http://jakarta.apache.org/ant/">Ant</a>, the fabulous
  Jakarta build tool, must be installed.
</li>
<li>
   Get the Velocity distribution from CVS or a nightly snapshot.
</li>
<li>
   Change directory to the <code>/contrib/temporary/veltag</code>
   directory in the Velocity distribution.
</li>
<li>
   Type :
    <pre>
      $ ant getjars
    </pre>
    This will fetch JJAR and then use JJAR to fetch the dependencies du
    jour for Veltag.
</li>
<li>
   Type :
     <pre>
      $ant jar
     </pre>
    which will build the veltag-XX.jar (XX = current version).
</li>
</ol>
</primary>
<ol>
<li> 
  すぐれたビルドツールである、<a href="http://ant.apache.org/">Ant</a>
  がインストールされていなければなりません。
</li>
<li>
  CVS または夜間スナップショットから Velocity 配布を取得します。
</li>
<li>
  Velocity 配布の <code>/contrib/temporary/veltag</code> ディレクトリへ移動します。
</li>
<li>
  以下のようにタイプします。
    <pre>
      $ ant getjars
    </pre>
  こうすれば、JJAR を取得し、そのJJAR を使って、
  本日の Veltag の依存ライブラリを取得できます。
</li>
<li>
  以下のようにタイプします。
     <pre>
      $ant jar
     </pre>
  これで、veltag-XX.jar（XX = 現在のバージョン）がビルドされます。
</li>
</ol>

<primary>
<p>
That's it.  Pretty easy.
</p>
</primary>
<p>
以上です。かなり簡単です。
</p>

<primary>
<a name="nonJJAR build"><strong>The JJAR-Is-A-Work-In-Progress Way</strong></a>
</primary>
<a name="nonJJAR build"><strong>JJARが不安な人のための方法</strong></a>

<primary>
<p>
In the event the JJAR-based build is broken, or you just enjoy
schlepping around finding jars, do the following to build Veltag.
</p>
</primary>
<p>
JJAR ベースでのビルドがうまくいかなかった場合や、
JAR ファイルを探して回るのが好きな人は、
以下の手順で Veltag をビルドして下さい。
</p>

<primary>
<p>
To build, you need the following :
</p>
</primary>
<p>
ビルドで必要な手順は以下の通りです。
</p>

<primary>
<ul>
<li> 
  <a href="http://jakarta.apache.org/ant/">Ant</a>, the fabulous
  Jakarta build tool, must be installed.
</li>
<li>
  You will need a servlet API jar.  We recommend you get it from
  <a href="http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.3/bin/">here</a> 
  for servlet 2.2 and
  <a href="http://jakarta.apache.org/builds/jakarta-servletapi-4/nightly/">here</a>
  for the unreleased servlet 2.3 API.  Note - if you are a JSP user, you will have 
  one included with your servlet engine.
</li>
<li> 
   A velocity.jar.  This can be found, of course,
  <a href="http://jakarta.apache.org/velocity/">here</a>.
</li>
<li> 
  The build script expects to find the servlet and velocity jars in the
  <code>/contrib/temporary/veltag/lib/</code>
   directory.  Modification
  of the build script is easy if they are in another location.  Look for
  'servlet.home' and 'velocity.home' in the 
  <code>/contrib/temporary/veltag/build.xml</code> file.
</li>
<li>
  Once the above is complete, cd into 
  <code>/contrib/temporary/veltag</code> in the Velocity
  distribution and type 'ant'.  The jar should build
  for you.
</li>
</ul>
</primary>
<ul>
<li> 
  すぐれたビルドツールである、<a href="http://ant.apache.org/">Ant</a>
  がインストールされていなければなりません。
</li>
<li>
Servlet API の JAR ファイルが必要です。Servlet 2.2 API は<a
href="http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.3.1a/bin/">ここ</a> 
から、Servlet 2.3 APIは<a
href="http://cvs.apache.org/builds/jakarta-servletapi-4/nightly/">ここ</a>
からも取得できます。
注意: JSPユーザであれば、使用しているサーブレットエンジンに含まれています。
[訳注：例えば Tomcat 4であれば、$CATALINA_HOME/common/lib/servlet.jar がそれです。]
</li>
<li> 
velocity.jar。これはもちろん、
  <a href="http://jakarta.apache.org/velocity/">ここ</a>で見つけることができます。
</li>
<li> 
ビルドスクリプトは、Servlet と Velocity の JAR ファイルを
<code>/contrib/temporary/veltag/lib/</code>
ディレクトリで見つけることを想定しています。
これらのファイルが他の場所にあっても、ビルドスクリプトの修正は簡単です。
<code>/contrib/temporary/veltag/build.xml</code> ファイルにある
「servlet.home」と「velocity.home」を探して[指定を変更して]ください。
</li>
<li>
ここまでがすべて完了したら、
Velocity 配布の <code>/contrib/temporary/veltag</code> に移動して
「ant」とタイプします。JAR ファイルがビルドされます。
</li>
</ul>
</section>

<section name="Configuration" alias="設定">

<primary>
<p>
Using the taglib is very straightforward.  The following assumes
that you have setup a servlet container with JSP support, such as 
<a href="http://jakarta.apache.org/tomcat/">Tomcat</a>, and know
enough to write and view a simple JSP page.  Also, all directory 
references are relative to the root of the veltag project, not 
the Velocity distribution.
</p>
</primary>
<p>
このタグライブラリを使うのは非常に簡単です。以下の説明は、
<a href="http://jakarta.apache.org/tomcat/">Tomcat</a> のような
JSP をサポートする Servlet コンテナをセットアップしており、
簡単な JSP ページを書いて表示させられるだけの知識があることを
前提としています。また、すべてのディレクトリ参照は、Velocity 配布ではなく、
veltag プロジェクトのルートの相対パスです。
</p>

<primary>
<p>
To test the Velocity Taglib :
</p>
</primary>
<p>
Velocity Taglib をテストするには
</p>

<primary>
<blockquote>
   You need to copy the veltag-XX.jar to the
   <code>WEB-INF/lib</code> directory of your webapp. (Where XX 
   is the current version number.
</blockquote>
</primary>
<blockquote>
   veltag-XX.jar を Web アプリケーションの
   <code>WEB-INF/lib</code>ディレクトリにコピーしてください。
   (XXは、現在のバージョン番号です)
</blockquote>

<primary>
<blockquote>
   Take the example taglib descriptor,
   <code> /examples/veltag.tld</code> and place in WEB-INF of your
   webapp.
</blockquote>
</primary>
<blockquote>
   タグライブラリ記述子のサンプルである<code>/examples/veltag.tld</code> を
   あなたのWebアプリケーションの WEB-INF ディレクトリにコピーしてください。
</blockquote>

<primary>
<blockquote>
  Finally, add 
  <pre>
    &lt;taglib&gt;
      &lt;taglib-uri&gt;http://jakarta.apache.org/taglibs/veltag-1.0&lt;/taglib-uri&gt;
      &lt;taglib-location&gt;/WEB-INF/veltag.tld&lt;/taglib-location&gt;
    &lt;/taglib&gt;
  </pre>
  to your web.xml file, within the &lt;webapp&gt; section.
</blockquote>
</primary>
<blockquote>
   最後に、以下の内容を web.xml ファイル内の &lt;webapp&gt;
   セクションに追加してください。
   <pre>
     &lt;taglib&gt;
       &lt;taglib-uri&gt;http://jakarta.apache.org/taglibs/veltag-1.0&lt;/taglib-uri&gt;
       &lt;taglib-location&gt;/WEB-INF/veltag.tld&lt;/taglib-location&gt;
     &lt;/taglib&gt;
   </pre>
</blockquote>

<primary>
<p>
If you wish to use the included example JSP, you will also need to compile
<code>examples/SimpleBean.java</code> and place the resulting 
<code>SimpleBean.class</code> into the <code>WEB-INF/classes</code>
directory in your webapp.
</p>
</primary>
<p>
JSP サンプルを使いたい場合は、上記に加えて、
<code>examples/SimpleBean.java</code> をコンパイルし、
生成される <code>SimpleBean.class</code> を Web アプリケーションの
<code>WEB-INF/classes</code> ディレクトリ内に置く必要があります。
</p>

<primary>
<p>
  After that, try the example JSP found in <code>examples/</code>.  Drop it
  into the root of your webapp and view it with your browser. Enjoy!
</p>
</primary>
<p>
その上で、<code>examples/</code> にある JSP のサンプルを試してください。
この JSP を Web アプリケーションのルートにコピーし、ブラウザで見ます。
楽しんでみてください。
</p>

<primary>
<p>
Please direct all comments, questions, fixes and contributions to 
<a href="mailto:geirm@apache.org?SUBJECT=Veltag">Geir Magnusson Jr.</a> or the
Velocity user list.  To subscribe to the Velocity lists, read 
<a href="http://jakarta.apache.org/site/mail.html">this</a> and follow the 
instructions at the end.
</p>
</primary>
<p>
コメントや質問、修正や貢献については、
<a href="mailto:geirm@apache.org?SUBJECT=Veltag">Geir Magnusson Jr.</a>
または Velocity ユーザ メーリングリストに連絡してください。
Velocity メーリングリストに参加するには、
<a href="http://jakarta.apache.org/site/mail.html">このページ</a>
を読み、ページの指示に最後まで従ってください。
</p>

<primary>
<p>
  Please note that this code is not an official part of the Velocity
  distribution.
</p>
</primary>
<p>
注意: このコードは、公式の Velocity 配布の一部ではありません。
[訳注：つまり、通常ダウンロードする .zip ファイルや .tar.gz
ファイルには含まれていません。上にも書いたとおり、コードは<a
href="http://cvs.apache.org/viewcvs/jakarta-velocity/contrib/temporary/veltag/">http://cvs.apache.org/viewcvs/jakarta-velocity/contrib/temporary/veltag/</a>
にあります。]
</p>

</section>

</body>
</document>


