• 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

Tiles in JSF

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to configure tiles in myJSF application.

tiles-def.xml



index.jsp



Template.jsp.



Template1.jsp



while running the code i am getting an exception.
[Exception in:/pages/Template1.jsf] Cannot forward after response has been committed
Please help.
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While it's possible to use Tiles with JSF, I've never had a whole lot of satisfaction in attempting to use Tiles even in Struts. A better solution is to use Facelets, since Facelets functionality was merged into JSF for JSF2.

The actual error you're getting is thrown when you attempt to forward after the page has started rendering. I think Tiles may be partly to blame for that, since the very reason it frustrated me was its "inside-out" organization of resources.

That's not to say you can't forward from a Tiles app, but you do have to do the forwarding before (or instead of) rendering the tiles.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic