We are then given the option of creating a JSP file using standard syntax (default), a
JSP using XML syntax, or a JSP fragment. In our experience, most JSPs are developed
using standard syntax, and NetBeans provides us with a lot more help if we choose
this syntax. An alternative syntax for JSP files is the XML syntax, this syntax is less
popular than standard syntax and, other than code completion, NetBeans doesn't
offer a lot of help when working with this syntax, for this reason we chose to use
standard syntax for our pages.
We are also given the option of creating a JSP segment. JSP segments (or fragments)
are pages containing common markup that is contained in many pages in an
application. JSP fragments typically contain navigation menus, header information,
and so on. They can then be included dynamically into JSPs in the application.
The advantage of JSP fragments is that these common markups can be maintained
separately instead of having to update several JSPs in the application. We will cover
JSP fragments later in this chapter.
After entering all appropriate data in the New JSP File pop up window, NetBeans
generates a JSP file which we can use as a starting point. We need to modify this file
so that it displays the data that was entered in the previous page.