| | |
Layout template
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2009
Posts: 4
Reputation:
Solved Threads: 0
Hey guys,
I'm currently learning JSP and Java using Netbeans, and I was wondering if there was an easy way to create a web template layout. For example, using a single header, footer, and navigation bar for all pages. In Ruby on Rails, there is a "layouts" view, which you can define an .rhtml page and simply put the yield tag, <%= yield %> . Once this is done, all of the views you create will simply append the layout where the yield tag is. Is there something similar to this that I can use for a Java Web App?
Thanks,
- Jeff Miller
I'm currently learning JSP and Java using Netbeans, and I was wondering if there was an easy way to create a web template layout. For example, using a single header, footer, and navigation bar for all pages. In Ruby on Rails, there is a "layouts" view, which you can define an .rhtml page and simply put the yield tag, <%= yield %> . Once this is done, all of the views you create will simply append the layout where the yield tag is. Is there something similar to this that I can use for a Java Web App?
Thanks,
- Jeff Miller
1
#3 Nov 8th, 2009
> Is there something similar to this that I can use for a Java Web App?
Yes, you can either use the <jsp:include> standard action or tag files to include reusable view templates in your web pages.
Edit: Just keep in mind that the above mentioned techniques include the content at runtime. If you are pretty sure that your re-usable views would never host dynamic content, go with the include directive which includes the content at translation time as opposed to run-time.
Yes, you can either use the <jsp:include> standard action or tag files to include reusable view templates in your web pages.
Edit: Just keep in mind that the above mentioned techniques include the content at runtime. If you are pretty sure that your re-usable views would never host dynamic content, go with the include directive which includes the content at translation time as opposed to run-time.
Last edited by ~s.o.s~; Nov 8th, 2009 at 2:16 pm.
I don't accept change; I don't deserve to live.
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
![]() |
Similar Threads
- Quality Web Design, Logo, and Banner Services (PICTURES INCLUDED) (Post your Resume)
- Please review my website (Website Reviews)
- Review request for www.eservicebazaar.com (Website Reviews)
- help needed for newby (HTML and CSS)
- Please review : www.inews4all.com (Website Reviews)
- genarating html reports (C#)
- Stuck inserting php page "include" (PHP)
- Self-Replicating Websites... (ASP.NET)
- In Desperate Need Of Oscommerce Template/Layout (Site Layout and Usability)
- navigational help (ASP.NET)
Other Threads in the JSP Forum
- Previous Thread: sending email by using JSP
- Next Thread: Eclipse Tomcat Not Responding
Views: 569 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for JSP
apache array backbutton combobox comma connection csv database development directorystructure dropdownlist dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 mysql netbeans network parameters passing ping printinserverinsteadofclient project read redirect request.getparameter response seperated servlet servletdopost()readxml sessions software sql ssl state_saving_method stocks sun tomcat tutorial update values video web write






