The next line we see that isn't standard HTML is a JSP page directive. JSP page
directives define attributes that apply to the entire page. A JSP page can have more
than one page directive, and each directive defines one or more page attributes.
The contentType attribute sets the mime type and, optionally, the character set for
the page. The pageEncoding attribute sets the character encoding the page uses to
We can see all valid attributes (and their descriptions) for the page directive by
typing < %@page and then hitting ctrl+space ; rather than repeating this information
here, readers are encouraged to see it "live" in NetBeans by performing this action.
We will now write our own web application using NetBeans' generated code and
markup as a base.
Modifying NetBeans' generated code
In this section we will develop a simple web application. The application will be a
simple survey asking software developers what programming languages they are
familiar with. We need to develop two pages, an input page where the information
from the user will be collected, and an output page where the information entered by
the user will be displayed. The output page will serve as a confirmation page where
the user can verify that his or her input was collected properly.