Java Reference
In-Depth Information
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 through the drag and drop
functionality. Additional JSTL tags exist, however they aren't used very frequently,
and therefore are not included in the NetBeans palette. NetBeans certainly supports
code completion for these tags. For more information about JSTL, see the JSTL site at
http://www.oracle.com/technetwork/java/index-jsp-135995.html .
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
we need 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 to 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