The Jakarta Project < Tools - View >

Velocity Tools

VelocityView

VelocityView Tools

その他のサブプロジェクト

VelocityServlet へようこそ!
       

VelocityServlet is a subproject of Velocity. Its goals is to create a standalone Velocity servlet that can be used for template rendering in Web applications.

VelocityServlet は Velocity のサブプロジェクトです[訳注: この記述はVelocityToolsができる前の古い記述です]。 ウェブアプリケーションでテンプレートをレンダリングできるスタンドアロンの Velocity サーブレットを作成することが目的です。

Intended audience of this subproject are Web application developers that plan on adding Velocity as a view layer technology to their Servlet-based web application framework. VelocityServlet offers the following key features:

このサブプロジェクトの対象は、サーブレットベースのウェブアプリケーションフレームワークのビューレイヤテクノロジとして Velocity を使用しようとするウェブアプリケーション開発者です。 VelocityServlet は以下の主な機能を提供します:

  • VelocityViewServlet provides is a standalone Java servlet that renders Velocity templates. Its class name is org.apache.velocity.tools.view.servlet.VelocityViewServlet. It can be invoked either directly from Web clients or from other servlets by forwarding request for template rendering to it. Its usage is similar to the JSPServlet for rendering JSP pages.
  • VelocityViewServlet makes ServletRequest attributes, HttpSession attributes and ServletContext attributes automatically available to the template designer through the Velocity context. It is not necessary to explicitely populate the Velocity context.
  • VelocityViewServlet offers toolbox support. It is possible to define a set of view tools (view helpers) that are made available to the template designer automatically through the Velcity context.
  • Velocity log output can be redirected to the log infrastructure of the Web application. By default, the log is directed to the logging facility provided by the Servlet API.
  • VelocityViewServlet は Velocity のテンプレートをレンダリングするスタンドアロンの Java サーブレットを提供します。 クラスの名前は org.apache.velocity.tools.view.servlet.VelocityViewServlet です。 これはウェブクライアントから直接、または他のサーブレットからリクエストがフォワードされたときに、テンプレートのレンダリングのために呼び出されます。 使い方は JSP をレンダリングする JSPServlet によく似ています。
  • VelocityViewServlet は ServletRequest の属性、 HttpSession の属性、 ServletContext の属性を Velocity コンテキストを通して、自動的にテンプレートデザイナに提供します。 明示的に Velocity コンテキストを設定する必要はありません。
  • VelocityViewServlet はツールボックスをサポートしています。 ツールボックスには、 Velocity コンテキストを通して、自動的にテンプレートデザイナに提供されるビューツール (ビューのヘルパー) のセットを定義することができます。
  • Velocity のログ出力はウェブアプリケーションのログ機構へリダイレクトすることが可能です。 デフォルトでは、ログはサーブレット API で提供されているログ機能へ出力されます。

Using VelocityViewServlet, it becomes possible to write Web applications that are independent of a particular view technology. This opens a straightforward migration path between JSP pages and Velocity templates as the view layer technology in Web applications.

VelocityViewServlet を使用し、特定のビューテクノロジに依存しないウェブアプリケーションを作成することが可能になります。 JSP から Velocity テンプレートへ、ウェブアプリケーションのビューレイヤテクノロジのストレートな移行を可能にします。

A typical application case for VelocityViewServlet is to use it in conjunction with a Servlet-based web application framework. VelocityStruts is a Velocity subproject that brings Velocity to the Struts world and is the first application that takes advantage of VelocityViewServlet.

VelocityViewServlet を適用する典型的なケースとしては、サーブレットベースウェブのウェブアプリケーションフレームワークを併用することです。 VelocityStruts は Velocity を Struts の世界へ統合する Velocity のサブプロジェクトであり、 VelocityViewServlet の利点を享受することのできる最初のアプリケーションです。

To be added

追加予定

  • Examples
  • Configuration of Servlet
  • Configuration of Toolbox
  • Javadoc
  • サーブレットの設定
  • ツールボックスの設定
  • Javadoc

[訳注: この文書は 木村 貴由 野瀬 直樹 が翻訳しました。 日本語訳に対するコメントがあれば、report@jajakarta.orgに送って下さい。]
Copyright © 1999-2003, Apache Software Foundation