Define action aliases to your jsps and use those actions for eg:

<action path="index" forward="/WebComponemt/Presentation/index.jsp"/>

and use that in your tiles menu

<putList name="items" >
<item value="Home" link="/index.do" />
</putList>

You can do some processing on the list of items that are read by the tiles 
to include the <contextPath> as part of the "link" attributes


On 9/13/05, Kam Lung Leung <[EMAIL PROTECTED]> wrote:
> 
> 
> Hi,
> 
> I am working on a project that uses Tiles and Structs.
> I have the following Tiles definition;
> <!-- Menu definition -->
> <definition name="Infra.WebComponemt.AdminMenuItems" 
> path="/Infra/WebComponemt/Layouts/menuLayout.jsp" >
> <put name="title" value="User Administration Menu" />
> <putList name="items" >
> <item value="Home" link="/WebComponemt/Presentation/index.jsp" />
> <item value="User Administration" 
> link="/WebComponemt/Presentation/UsersAdministrationPage.jsp" />
> </putList>
> </definition>
> 
> What can I do to prevent the path of the UsersAdministrationPage.jsp and
> the index.jsp files show up in the Address box of a browser. Would the
> following step help preventing the path of the UsersAdministrationPage.jsp
> to show up?
> 
> <!—Rewrited Menu definition -->
> <definition name="Infra.WebComponemt.AdminMenuItems" 
> path="/Infra/WebComponemt/Layouts/menuLayout.jsp" >
> <put name="title" value="User Administration Menu" />
> <putList name="items" >
> <item value="Home" link="index" />
> <item value="User Administration" link="UsersAdministrationPage" />
> </putList>
> </definition>
> 
> Add a Global Forward in the structs-config.xml file like below:
> <struts-config>
> <!-- ==== Global Forward Definitions ============= -->
> <global-forwards>
> <forward name="index" path="/WebComponemt/Presentation/index.jsp.do"/>
> <forward name=" UsersAdministrationPage " 
> path="/WebComponemt/Presentation/UsersAdministrationPage.jsp"/>
> </global-forwards>
> </struts-config>
> 
> Any suggestion is greatly appreciated.
> Kam Lung Leung
> [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Reply via email to