|
The SecureLinkTool extends the standard
LinkTool and has the exact same interface as
StrutsLinkTool and the same function. It should
substitute the StrutsLinkTool in the toolbox if
SSL Ext is installed.
It's functionality is a subset of the functionality provided by the
sslext tag library for JSP.
SecureLinkToolはLinkToolを拡張し、
StrutsLinkToolと全く同じインターフェイスと機能を持ちます。
SSL Extがインストールされている場合、
toolboxのStrutsLinkToolを置き換えます。
提供する機能はJSPのsslextタグライブラリの機能のサブセットです。
The SSL Ext. Struts extension package makes it possible to declare Struts actions
secure, non-secure, or neutral in the struts config like so:
SSL Ext. Struts拡張パッケージはStrutsのアクションをセキュア、セキュアでない、
またはどちらでもと宣言することを可能にします。struts定義には次のように記述します:
<action path="/someSecurePath" type="some.important.Action">
<set-property property="secure" value="true"/>
<forward name="success" path="/somePage.vm" />
</action>
|
|
If an action is declared secure the SecureLinkTool will render the relevant link
as https (if not already in ssl-mode). In the same way, if an action is declared
non-secure the SecureLinkTool will render the relevant link as http (if in ssl-mode).
If the action is declared as neutral (with a "secure" property of "any") then the
SecureLinkTool won't force a protocol change either way. If the custom
request processor is also used then a request will be redirected to the correct
protocol if an action URL is manually entered into the browser with the wrong protocol
アクションがセキュアと宣言された場合、SecureLinkToolはリンクを(既にsslモードでない場合)
httpsとして処理します。同様に、アクションがセキュアでないと宣言された場合、
SecureLinkToolはリンクを(sslモードの場合)httpとして処理します。
アクションが("secure"プロパティに"any"を指定して)どちらでもと宣言された場合、
SecureLinkToolはどちらの場合においてもプロトコルの変更をしません。
カスタムのリクエストプロセッサが使用されている場合、
ブラウザに手でアクションURLを間違ったプロトコルで入力した場合、
要求を正しいプロトコルにリダイレクトします。
These are the steps needed to enable SSL Ext:
- SSL connections need to be enabled on the webserver.
- The Java Secure Socket Extension (JSSE) package needs to be in place (it's
integrated into the Java 2 SDK Standard Edition, v. 1.4 but optional for earlier
versions)
- In toolbox.xml the SecureLinkTool should substitute the StrutsLinkTool
- In struts-conf.xml the custom action-mapping class needs to be specified
- In struts-conf.xml the custom controller class can optionally be specified
(if the redirect feature is wanted)
- In struts-conf.xml the SecurePlugIn needs to be added
- In struts-conf.xml, when using Tiles, the SecureTilesPlugin substitues both the
TilesPlugin and the SecurePlugIn and it also takes care of setting the correct
controller so there is no need to specify the custom controller.
SSL Extを有効にするために必要な手順です:
- Web サーバ上でSSL接続を有効にします。
- Java Secure Socket Extension (JSSE)パッケージが必要です。
(Java 2 SDK Standard Edition, v. 1.4には統合されていますが、
以前のバージョンではオプションとなっています)
- toolbox.xmlにて、StrutsLinkToolをSecureLinkToolで置き換えます。
- struts-conf.xmlにて、カスタムのアクションマッピングクラスを指定します。
- struts-conf.xmlにて、オプションでカスタムのコントローラクラスを指定します。
(リダイレクト機能を使用したい場合)
- struts-conf.xmlにて、SecurePlugInを追加します。
- Tilesを使用する場合、struts-conf.xmlにて、
TilesPluginとSecurePlugIn両方をSecureTilesPluginで置き換えます。
正しいコントローラをセットしてくれますので、
カスタムコントローラを指定する必要はありません。
- See Also
-
SSL Ext. project home
- See Also
-
SSL Ext. プロジェクトホーム
| Class |
| | org.apache.velocity.tools.struts.SecureLinkTool |
| Name |
| | $link (Velocityコンテキスト内での推奨名) |
| Toolbox設定例 |
| | <tool>
<key>link</key>
<scope>request</scope>
<class>org.apache.velocity.tools.struts.SecureLinkTool</class>
</tool> |
| 作者 |
| | Marino A. Jonsson
|
|