aspose file tools*
The moose likes Struts and the fly likes Action as a tile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Action as a tile" Watch "Action as a tile" New topic
Author

Action as a tile

Fedor Smirnoff
Ranch Hand

Joined: Apr 21, 2003
Posts: 45
Is it against MVC pattern to include an action, which prepares the data, as a tile? something like this:
<tiles:insert page="/prepareData.do"/>

The reason for that is that I cannot forward to this action and than have action forward to jsp due to the fact that I am using a UrlController for tiles.

Thank you.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I guess that depends on what this "preparing of data" means? Having your JSP include the results of a servlet or a Struts action is not that different from including the results of another JSP -- it's the semantics, not the technology, that matters most here.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Jitesh Sinha
Ranch Hand

Joined: Jun 19, 2004
Posts: 146
Well,I don't think it matters...
Main advantage of tiles is that it makes our JSP coding pattern based...
If you can do that,then you are using tiles to your advantage,otherwise not...
Fedor Smirnoff
Ranch Hand

Joined: Apr 21, 2003
Posts: 45
Well, this action gets the data from database and populates one of the beans that is used on the jsp page.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Action as a tile