• 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

How to include headers&footers in Tapestry templates ?

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
Can we use JSP pages as the templates for Tapestry ?
I'm asking this beacause I was wondering to include the header and the footers in all pages of the application ?
Thanks.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, you can't use JSP's in Tapestry. Why would you want to?

Tapestry has a built in templating system. That's what all those HTML files are for. What you need to do is create a Border page that will consist of your template. The part of that "Border" page where you want the main part of your page to display goes in a RenderBody tag.

Buy Kent Tong's book. It's only $20 US and it is an excellent book on Tapestry. There is a whole chapter that deals with creating a "Border" or template for your site. Very easy to do too.
 
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gregg Bolinger:
No, you can't use JSP's in Tapestry. Why would you want to?



It would be bizarre, but strictly speaking I believe you could make it happen if you have to. This doesn't sound like it fits at all into the have to category.

For the bizarrely inclined, you would use the RequestContext to get to HttpServletRequest, which gives you access to the RequestDispatcher, from which you could do a servlet include. That is your path to anything servlet-based, including JSPs.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic