File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Action as a tile

 
Fedor Smirnoff
Ranch Hand
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jitesh Sinha
Ranch Hand
Posts: 146
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, this action gets the data from database and populates one of the beans that is used on the jsp page.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic