Forums: Open Discussion (Thread #19378)

struts-config.contextRelativeFalse.xmlについて (2008-07-22 14:46 by Anonymous #37753)

struts-config.contextRelativeFalse.xmlと
struts-config.contextRelativeTrue.xmlと
struts-config.xmlの中身は同じですが、
struts-config.contextRelativeFalse.xmlと
struts-config.contextRelativeTrue.xmlは何の役割ですか?

システムには影響はないですが、知りたいだけです。

よろしくお願いいたします。

Reply to #37753×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: struts-config.contextRelativeFalse.xmlについて (2008-07-22 15:03 by kimuraku #37755)

ver2.0.0.2⇒ver2.0.1.0のバージョンアップ時に、
ForwardActionの遷移先の指定方法が変更されています。

具体的には、<action>要素のparameter属性の指定方法について
コンテキスト相対パスかモジュール相対パスか選択可能となっています。

従来のTERASOLUNAフレームワークではモジュール相対パスで
指定していましたが、Strutsのコンテキスト相対パスでも指定可能です。

system.propertiesで
   forwardAction.contextRelative=true
を設定した場合はコンテキスト相対パス指定モードになり、
   forwardAction.contextRelative=false
を設定した場合は、従来通りモジュール相対パスモードとなります。

モジュール名が"hoge"の場合の各モードでの設定例は以下の通りです。
○コンテキスト相対パスの遷移先設定例
<action path="/hogeSCR"
     name="_hogeForm"
     scope="session"
     parameter="/hoge/foo.jsp">

○モジュール相対パスの遷移先設定例
<action path="/hogeSCR"
     name="_hogeForm"
     scope="session"
     parameter="/foo.jsp">


ブランクプロジェクトのデフォルトの設定ではモジュール相対パスモードに
なっていますので、変更する際はsystem.propertiesを修正して下さい。

詳しくは機能説明書「WE-03 フォワード機能」をご参照下さい。
Reply to #37753

Reply to #37755×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: struts-config.contextRelativeFalse.xmlについて (2008-07-22 15:07 by kimuraku #37756)

ちなみに上記サンプルAPで、struts-config.contextRelativeTrue/False.xml の
2種類が存在しているのは、antスクリプトで両モードを切り替えて、動作確認
を行うための便宜上の理由からです。

通常の開発時は、system.propertiesのforwardAction.contextRelativeプロパティだけ
どちらかのモードに設定すれば問題ありません。
Reply to #37755

Reply to #37756×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: struts-config.contextRelativeFalse.xmlについて (2008-07-22 19:22 by Anonymous #37770)

変更経由を了解しました。

antスクリプトで両モードを切り替えること
も分かりました。

ありがとうございました。
Reply to #37753

Reply to #37770×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login