Announcement Announcement Module
Collapse
No announcement yet.
"redirect:" with Tiles? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • "redirect:" with Tiles?

    Hi guys,

    I'm using Tiles with Spring MVC. I have a question regarding using the "redirect:" option:

    I have a MultiActionController with multiple related "action" methods that return ModelAndView. For example:

    Code:
    ModelAndView action1(request, response) {
        do stuff...
        return ModelAndView("tilesName");
    }
    So, my question is: what happens if I want to redirect to a particular Tiles view name? I tried:

    Code:
        return ModelAndView("redirect:tilesName");
    ... but that doesn't seem to be the correct place to put it.

    Has anyone else done this?

    Cheers,

    Matt.

  • #2
    You can't redirect to a tiles name.

    You can redirect to a .htm, etc. as you probably already know.

    It would be nice if you could to avoid having to know the underlying controller mapping name, and reference a page the same way regardless of whether you were doing a forward or a redirect.

    Best you can probably do is inject the .htm name that you want to redirect to into the controller.

    Comment


    • #3
      Hi Matt,
      This might not be much help to you but I had the same problem and that was when I started looking at Sitemesh. It might not be an option for you but my project was still in it's early stages and the switch was surprisingly easy. Having used them both now, I prefer Sitemesh over Tiles.

      Cheers,
      Kevin

      Comment

      Working...
      X