Working with page fragments-NetBeans IDE 6.5 Tutorial

Source: Internet
Author: User
Tags header glassfish netbeans

In this tutorial, you will use NetBeans IDE 6.5 to create an application that includes two JSF 1.2 (Woodstock) page fragment components. A fragment is used to hold the application's logo. Another fragment is used to hold links to navigation between the two pages of the application.

Examples of company logos used in this tutorial
»sky.jpg

This tutorial can be used to work with the following technologies and resources:

JavaServer Faces Components/

Java EE Platform

1.2 and Java EE 5*

1.1 and Java EE 1.4

Travel Database Not required

* To take advantage of the Java EE 5 features of NetBeans IDE 6.0, use an application server that is fully compatible with the Java EE 5 specification, such as GlassFish.

This tutorial is written to apply to the GlassFish V2 application server. If you use a different server, consult the release notes and FAQs for known issues and solutions. To learn more about supported servers and Java EE platforms, see the release notes.

About page Fragments

A page fragment is a part of a page, such as a header, footer, or navigation bar, which can be reused in other pages. For example, you might want to place a common element in a page fragment, such as an image or search field, and then include the fragment as a header in all the pages in your application. You may also want to include your company name and copyright information in another page fragment, and use this fragment as the footer for your application. Like the main page, a page fragment is a JSP page with a page Bean associated with itself, but the file name extension for the page fragment is JSPF rather than a JSP.

Design a page that contains a page fragment

You will begin this tutorial by creating the home page for your application. You will then create a header fragment and a navigation fragment and include the fragments in the home page.

Create a WEB application project called Fragmentexample. Enables the Visual Web JavaServer Faces framework.

Figure 1 shows the page you will create in the following steps:

Figure 1: The home page for the application

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.