I've never actually used modules in anger - but the "contextRelative"
was considered "deprecated" in favour of the "module" attribute since
Struts 1.2.4:
http://struts.apache.org/1.x/userGuide/release-notes-1_2_4.html
http://wiki.apache.org/struts/StrutsUpgradeNotes11to124
So I guess you should change to something like the following:
<forward
module="user"
name="userHome"
path="/user/home.do"
redirect="true" />
The struts-examples webapp shipped with Struts is split up into
modules - so maybe looking at how it works will help you to resovle
your issue.
Niall
On 3/23/07, Oren Livne <[EMAIL PROTECTED]> wrote:
Dear All:
My application context is called "Catalog". It uses Struts 1.3.8. There
are two modules, "default" and "user". In the default component struts
config, I have:
<!--
===============================================
Global forwards (alias for main page, etc.).
Needs to be placed in every module's Struts
config unless we use XDoclet to merge
a global global-forwards.xml file.
===============================================
-->
<global-forwards>
<!-- Catalog component home page -->
<!-- contextRelative=true doesn't seem to work from a local
action. -->
<forward
name="catalogHome"
path="/switchMod.do?prefix=/catalog&page=/home.do"
redirect="true" />
<!-- User component home page, which is also the application's
front page -->
<forward
contextRelative="true"
name="userHome"
path="/user/home.do"
redirect="true" />
</global-forwards>
Both methods work and forward to the correct URLs. However, I have the
identical global-forwards
in the user module's struts config. Now it forward to the wrong page
from an action in the user module.
The same result happened when I localized the forward to the action:
<action
path="/logout"
type="net.ruready.struts.user.action.LogoutAction">
<forward contextRelative="true" name="userHome"
path="/user/home.do" redirect="true" />
</action>
... it tries to forward to '/Catalog/user/user/home.do'. What do I do to
get it to work?
Thanks so much,
Oren
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]