there is no built in struts way (that i know of) to do this. the action servlet stores the global forwards collection in the servlet context, so you have access to that collection from your web components. once you grab it you can simply use the iterate tag to spit out the values contained in the forward objects it contains.
the main task of global forwards is to define commonly used request paths. the input element specifies where the input of a form came from, and also where the action servlet should forward back to should your action form's validate method return a populated ActionErrors object. -jc storck wrote: > How can I use global forwards for menu-generation? > What is the main task if global forwards? > For what is the input-property in the action-tag under action-mappings in > the struts-config.xml? > > -----Ursprungliche Nachricht----- > Von: Jonathan M Crater [mailto:[EMAIL PROTECTED]] > Gesendet: Freitag, 19. Oktober 2001 13:07 > An: [EMAIL PROTECTED] > Betreff: global forwards for menu generation > > i have found that my global forwards almost always contain my menu items, > and > thus it would be convenient to have an extra attribute on the forward > element > like "text" or "menu", the value of which could be presented in a jsp and > would > allow direct iteration through the forwards collection to generate a menu > based > on which forwards supplied a menu or text attribute. right now i have to > hook > into the forwards collection externally, using text supplied from another > configuration file in order to avoid having the paths in two different > places in > my app. has anyone else run into this? is there a standard way that this > is > being handled? if there is a reason why this is being avoided, i'd be > interested in hearing that as well. > > tia, > > jc

