Hi Jeff, thanks for the hint. Using the "include file" variant is probably a work-around for my problem, but it doesn't really allow for what I was planning. My idea was to have a global forwards section in each module that would be global for the application. Each module could that way define, how it can be "contacted" from other modules. Apparently, "global" seems to only mean "global for the module" and not "global for the application".
Writing it in a separate file and include this in all config files will work, but it's just as good as writing the global forwards form moduleX in all other module's config files. I will probably try to write config files for my modules, defining those globals in each of the module-config-files, but instead of including them as modules in the web.xml, I just include them as a comma-separated list in the config parameter.... If you know of any other way to solve this issue, please let me know. Regards, Peter > Have you read > http://struts.apache.org/userGuide/configuration.html#module_config-switching? > It explains how to use contextRelative forwards in Module A to forward > to pages in Module B. > > If that's not what you need, you could define all of your > application-global forwards in an XML external entity file and reference > that in the global-forwards section of each of your module configuration > files. > > 1) Create a file called global-forwards.xml that looks like this: > > <forward name="indexHome" contextRelative="true" path="/index/index.do" > redirect="true"/> > <forward name="modAHome" contextRelative="true" path="/modA/index.do" > redirect="true"/> > > ... and so forth > > 2) Declare this file as an external entity in each of your module > configuration files: > > <!DOCTYPE struts-config PUBLIC "public-id" "systemid > [ ENTITY globalForwards SYSTEM "../path/to/global-forwards.xml" ]> > > 3) Create a global-forwards section in each module that looks like so: > <global-forwards> > <!-- Module-global forwards --> > <forward name="page1" path="page1.do"/> > <forward name="page2" path="page2.do"/> > <!-- Pull in the contents of the globalForwards entity --> > &globalForwards; > </globalForwards> > > Peter Werno wrote: >> 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]