wood burning stoves 2.0*
The moose likes Spring and the fly likes Spring Tiles, Multiple Controllers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Tiles, Multiple Controllers" Watch "Spring Tiles, Multiple Controllers" New topic

Spring Tiles, Multiple Controllers

Dave Okey

Joined: May 16, 2011
Posts: 3
Hi All,

Thanks in advance for any help as this has me stumped.

I'm experimenting with Spring MVC for an upcoming project. I'll need some web pages in the application to render multiple reusable "components" and figured that Tiles should help me accomplish this? Each component would have it's own controller.

The example I've put together is only partially working. It's a page with 3 tiles. The 3rd tile has a controller that's trying to return an ArrayList (via @ModelAttribute annotation) to the client but the ArrayList is empty when the view is included as a tile.

Here's the tiles setup in *-servlet.xml:

Here's my tiles config (tiles.xml):

Here's the JSP code behind the tile in question. The "widgetsList" expression is what is bound to the controller method but coming back empty when this view is included as a tile.

Here's the controller:

When I access the the view "widgets.jsp" directly, the "widgetsList" attribute gets populated, it's only when it's added as a tile that it returns nothing.

Thanks for any advice here.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Spring Tiles, Multiple Controllers
Similar Threads
Spring MVC Integration of Tiles Complete Example
Problems while Configuring Tiles in Spring MVC
Not able to render view in Spring 2.5 with Tiles2
spring 3 and tiles 2.1.4 - basic problem
Tiles 2.2.1 with spring framework 3.0.2