WebSphere Application Server Network Deployment, Version 6.1   
             オペレーティング・システム: AIX , HP-UX, Linux, Solaris, Windows, Windows Vista

             目次と検索結果のパーソナライズ化

例: サーブレット・プログラミング・モデルを使用して 2 つの異なるコンテキストでリソースを探す

リモート側にリソースを組み込むためのサーブレット・プログラミング・モデルでは、 非 Java 2 Platform, Enterprise Edition (J2EE) サーブレットのアプリケーション・プログラミング・インターフェース (API) を使用する必要はありません。 リモート要求ディスパッチャー (RRD) コンポーネントは、 同じ規則に従って ServletContext とリモート・リソースを取得します。 JavaServer Pages 標準タグ・ライブラリー (JSTL) を使用することで、 アプリケーションは、フレームワークの 例で必要な ServletContext オブジェクトまたは RequestDispatcher の取得を免除されます。 JSTL のカスタム・タグが暗黙的にこの作業を実行するためです。 以下のサンプル JavaServer Pages アプリケーションの例を参考に、2 つの異なるコンテキスト (investments と banking) 内のリソースを探す方法を学んでください。

<HEAD>
<%@ page
language="java"
contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8059-1"
isELIgnored="false"
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" $>
</HEAD>
<BODY>

<%--

Programming example using JavaServer Pages and JavaSever Pages
Standard Tag Library (JSTL).
JSTL provides a custom tag to import contents (in servlet and JSP
terms include) in the scope of the same request from outside of
the current Web module context by specifying a context parameter.
JSTL restriction: The Web module that is imported
must run inside of the same JVM as the calling resource
if imported URL is not fully qualified.
RRD extends this functionality by permitting the Web module to
be located within the scope of the current WebSphere Application
Server core group versus the scope of the JVM.
--%>


<hr size="5"/>
<%--		Include resource investmentSummary.jsp located in the 
		Web application with context root of /investments. --%>

<c:import url="investmentSummary.jsp" context="/investments"/>

<hr size="5"/>
<%--		Include resource accountSummary.jsp located in the 
		Web application	with context root of /banking. --%>

<c:import url="accountSummary.jsp" context="/banking"/>

<hr size="5"/>

</BODY>
</HTML>



関連タスク
タスク概要: リモート要求ディスパッチャーを使用するアプリケーションのアセンブル
リモート組み込みをディスパッチするための Web アプリケーションの構成
リモート組み込みを処理するための Web アプリケーションの構成
関連資料
例: フレームワーク・プログラミング・モデルを使用して 2 つの異なるコンテキストでリソースを探す
参照トピック    

ご利用条件 | フィードバック

最終更新: Jan 21, 2008 7:44:53 PM EST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/rweb_rrd_xml_servlet.html