struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bailey, Shane C." <SHANE.C.BAI...@saic.com>
Subject RE: Re[2]: Forwarding to a tile definition
Date Thu, 12 Jun 2003 18:13:11 GMT

A link to a tiles def is like linking to a JSP.  This is Model 1 and not
Model 2 architecture.  Someday, you will want something to occur (like a
security check or something) before every page is served up and you are
going to have to go back to all your links and rewrite them because JSPs are
calling JSPs.  It is not good.

I don't understand what the problem is.  You add one element to your struts
config and the problem is solved.

So instead of <a href="doc.homepage">Home</a>  then you would have
<a href="/linkHome.do">Home</a> by adding this:

    <action    path="/linkHome"
	    parameter="doc.homepage"
	    type="org.apache.struts.actions.ForwardAction">
    </action>

So everything is still going through your controller. Later on if you have
to load up personalized info on the home page then you create a new action,
say, named PrepHome.java and simply change your action mapping to be 

    <action    path="/linkHome"
	    parameter="doc.homepage"
	    type="my.PrepHome"
          ...
          >
    </action>


Am I missing something?



-----Original Message-----
From: Nimish Chourey , Tidel Park - Chennai
[mailto:NimishC@msdc.hcltech.com] 
Sent: Thursday, June 12, 2003 10:11 AM
To: Struts Users Mailing List
Subject: RE: Re[2]: Forwarding to a tile definition

+1 .. I too was wandering .. 
I guess Probably because Tiles is just treated as a plugin .. and not really
part of Struts 

-----Original Message-----
From: Davidson, Glenn [mailto:Glenn.Davidson@tiaa-cref.org]
Sent: Thursday, June 12, 2003 7:23 PM
To: 'Struts Users Mailing List'
Subject: RE: Re[2]: Forwarding to a tile definition


To the designers of Struts:
Why not allow a link:forward to forward directly to a tiles definition?
It
appears that we have to forward to an action then have the action
forward to
the tile definition. Any thoughts?

Glenn

-----Original Message-----
From: Dirk Markert [mailto:dirk.markert@dr-markert.de]
Sent: Thursday, June 12, 2003 9:10 AM
To: Struts Users Mailing List
Subject: Re[2]: Forwarding to a tile definition


Hallo Greg,

consider again your url

"http://www.mymacine.com/myapp/my.tile.def"

which you get by using html tags. What else would you expect?
What should be in your server created html file? In my opinion the
url is indeed correct.

If your browser sends a request to the server the server is configured
to handle *.do and *.jsp. How is the server supposed to know how to
handle *.def?

Regards,
Dirk  

***************************************************************


GFM> On Jun 12, 2003, <shirishchandra.sakhare@ubs.com>  wrote:

GFM>  |Have u checked the definition?
GFM>  |Because when you do a forward, the definition is searched for
..And
in your c
GFM>  | ase, it seems that it is not finding the definition.

GFM> I know it is finding the forward - that is how it is getting the
GFM> literal text "my.tile.def".  And, I confirmed that literal text is
the
GFM> same in the forward as it is in the tiles-defs.xml file.

GFM> Now, Dirk recommended to use actions.  I'll give that a try again.
I
GFM> had it that way before, but I don't remember what the problem was -
it
GFM> could be that the html:link action= wasn't working which would also
GFM> suck (I should use action= for actions and forward= for forwards,
GFM> right?).

GFM> Thanks,

GFM> /greg

GFM> --
GFM> Gregory F. March    -=-    http://www.gfm.net:81/~march    -=-
AIM:GfmNet

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


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

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


Mime
View raw message