Java Reference
In-Depth Information
After executing our page by right-clicking on it and selecting Run File from the
pop-up menu, we can see the results of our DELETE statement.
Since we deleted all rows matching the criteria in the WHERE clause of the <sql:
query> tag generated by the DB Report item we dragged into our page, all we see in
the rendered page is a table containing only column headers.
Closing Remarks about JSTL
We covered all the JSTL tags supported by NetBeans via drag-and-drop
functionality. Additional JSTL tags exist, however they aren't used very frequently,
and therefore not included in the NetBeans palette. NetBeans certainly supports
code completion for these tags. For more information about JSTL, see the JSTL site at .
Custom JSP Tags
Sometimes we need to add very similar snippets of HTML to our pages. For
example, we might have a calendar component used to input all dates in our system,
or we might have a specific format for all address input fields in our application.
Although we can certainly copy and paste the code throughout all JSP pages that
need it in our application, this approach is not very desirable, since, if we need to
make a change to the common code, we need to go through all the pages and make
individual modifications. When using JSPs, we can create custom JSP tags. These JSP
tags allow us to create the HTML code we need in one place, then we simply use the
tag in any page that requires it. NetBeans has great support for helping us develop
custom JSP tags.
Creating a JSP tag is not much different than creating a JSP. To create a JSP tag,
a tag file is created, it needs to be placed under the WEB-INF/tags folder in our
application, or in any subdirectory of this directory.
Search WWH ::

Custom Search