struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cedric Dumoulin <ced...@apache.org>
Subject Re: Using global forwards to tile definitions?
Date Tue, 10 Sep 2002 17:33:07 GMT

  Yes, the problem comes from  <html:link>. It is not a bug: Tiles 
definitions name are logical names, not URLs. <html:link> require a real 
URL to work because its result is interpreted on the server side.

   Cedric

wbchmura@Ensign-BickfordInd.com wrote:

>Well, that does help.  I can stop banging my head against the desk
>now...
>
>In the struts book online it covers this...
>
><definition name="storefront.superuser.main"
>extends="storefront.default">    
>    <put name="header" value="/common/super_header.jsp" />
>    <put name="menubar" value="/common/super_menubar.jsp" />
>    <put name="copyright" value="/common/copyright.jsp" />  
>  </definition>  
></tiles-definitions>
>
><global-forwards>
> <forward name="Super_Success" path="storefront.superuser.main" />   
></global-forwards>
>
>----
>
>So this is a problem in the HTML:Link forward code?  Is it intentional? 
>Is it something I can look at fixing?
>
>Thanks for the answer!
>
>
>
>
>-----Original Message-----
>From: cedric [mailto:cedric@apache.org]
>Sent: Tuesday, September 10, 2002 12:24 PM
>To: struts-user
>Subject: Re: Using global forwards to tile definitions?
>
>
>
>  The <html:link> tag can't be used with a Tiles name as path. You need 
>to use an intermediate action. An often used solution is to have an 
>action taking a definition name as http parameter, like the tiles 
>DefinitionDispatcherAction. This action should check if the provided 
>definition name is allowed, otherwise it is possible to access all your 
>definitions.
>  Your global forward could now look like:
>
>   <forward name="home"
>path="path.to.dispatcheraction.do?def=plantsec.index"/>
>
>  Hope this help,
>         Cedric
>
>wbchmura@Ensign-BickfordInd.com wrote:
>
>  
>
>>I'm going back and trying to implement some "best practices" that I
>>skipped over in the beginning.  One of which is to use global forwards
>>alot.   
>>
>>Say I have some global forwards that look like this:
>>
>><global-forwards>
>>  <forward name="home"          path="plantsec.index"/>
>>  <forward name="faqMain"       path="plantsec.faq"/>
>>  <forward name="contactMain"   path="plantsec.contact"/>
>>
>>
>>And in my JSP pages I use:
>>
>><html:link forward="contactMain">Contact Us</html:link>
>>
>>I can see the benefit that gives me.
>>
>>But if I have a tiles definition for the plantsec.faq it does not seem
>>to want to run that.  Am I doing something wrong or do I need to use an
>>action for every one of those?  That is the only way I can seem to make
>>it work...
>>
>>Any help is appreciated
>>
>>
>>
>>
>>
>>
>>William B Chmura
>>Internet Services Admin / IT Department 
>>Ensign-Bickford Industries, Inc and subsidiaries
>>
>>Tel: 860.843.1542
>>660 Hopmeadow Street
>>Simsbury, CT  06070
>>
>>http://www.e-bind.com
>>http://www.e-bco.com
>>http://www.e-brealty.com
>>http://www.eba-d.com
>>http://www.applied-food.com
>>
>>
>>
>>
>> 
>>
>>    
>>
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail:
><mailto:struts-user-help@jakarta.apache.org>
>
>
>
>  
>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message