• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using simple Tiles redirection

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This was a bit of a stumper until one of us found a solution:

The problem: Want to set up a link to a plain ol� JSP page within a framework which uses Tiles and Spring. But how much effort do we need to expend to create this seemingly simple link?

The Solution: use UrlFilenameViewController as a �default controller� which will simply forward on to the appropriately named Tiles definition.

The Implementation: We have a jsp called prlsite_tool.jsp, to which we wish to link from our page menu.jsp. First, set up a Tiles definition for this jsp page:

Next, in the Spring config, enable a default controller instance:

Now, add a URL matching pattern which will catch the link to the new page:

Now, any links to �/admin/somethingsomething.spring� will be forwarded to a somethingsomething.jsp under the /admin path� which is exactly what we want! Last step is to put in the link on the menu page:
 
reply
    Bookmark Topic Watch Topic
  • New Topic