You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by wb...@Ensign-BickfordInd.com on 2002/09/10 18:08:45 UTC

Using global forwards to tile definitions?

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

 


Re: Using global forwards to tile definitions?

Posted by Cedric Dumoulin <ce...@apache.org>.
  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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>