Hello Jeff,

thanks for the hint. I had tested multiple variations of it, including
/index/index.do, but to no avail. I have checked in the Action Class that
tries to get it. It does

-----

ActionForward myForward = mapping.findForward("indexHome");
if(myForward == null)
    System.out.println("Forward is null!!!");

-----
and it returns null allways. I even tried different names
("index/indexHome", "/index/indexHome", etc.)

This Action Class is actually belonging to the "DEFAULT" part of the
webapp. Is it possible that "global" forwards are only global for the
module that they are defined in?

In that case, modules will probably be a no-go for me :/

Regards,

Peter


> Peter Werno wrote:
>> This is how it works:
>>
>> --------- struts-config.xml ----------
>>
>> <struts-config>
>>     ...
>>
>>     <global-forwards>
>>         <forward name="home" path="/index.jsp" redirect="false"/>
>>         <forward name="loginform" path="/login.jsp" redirect="false"/>
>>         <forward name="error500" path="/error/err500.jsp"
>> redirect="false"/>
>>         <forward name="trylogin" path="/loginAction.do"
>> redirect="false"/>
>>         <forward name="indexHome" contextRelative="true"
>> path="/index/index.do" redirect="true"/>
>>         .... more ....
>>     </global-forwards>
>>     ...
>> </struts-config>
>>
>> --------- end ---------
>>
>> this is how it does NOT work:
>>
>> --------- index-config.xml ----------
>>
>> <struts-config>
>>     ...
>>     <global-forwards>
>>         <forward name="indexHome" contextRelative="true" path="index.do"
>> redirect="true"/>
>>     </global-forwards>
>>     ...
>> </struts-config>
>>
>> --------- end ---------
>>
>> many thanks,
>>
>> Peter
>
> I think you're confused on the meaning of contextRelative.
> contextRelative means to interpret the path relative to the web
> application root, not the module root.  So in your second example, the
> forward named 'indexHome' will attempt to find /index.do, not
> /index/index.do as the first example.
>
> -- Jeff
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to