IntelliJ Java IDE
The moose likes Other Application Frameworks and the fly likes How to include headers&footers in Tapestry templates ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Other Application Frameworks
Reply Bookmark "How to include headers&footers in Tapestry templates ?" Watch "How to include headers&footers in Tapestry templates ?" New topic
Author

How to include headers&footers in Tapestry templates ?

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3334

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.
Gregg Bolinger
Sheriff

Joined: Jul 11, 2001
Posts: 15040

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.


My Blog | DZone Articles
Reid M. Pinchback
Ranch Hand

Joined: Jan 25, 2002
Posts: 775
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.


Reid - SCJP2 (April 2002)
 
 
subject: How to include headers&footers in Tapestry templates ?
 
Threads others viewed
Wicket, the big door for Java developers
Can't find it in the book..common headers and footers
How to include another page in Tapestry
Help -two submit button-how to handle..
JSP page not getting displayed on linux machine browser
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture