Java Reference
In-Depth Information
Notice that this JSP markup is a bit different to what we have seen before. The
reason for this is that there are two ways JSPs can be coded. The first way is to use
"traditional" JSP tags, which is what we have seen so far. The second method is to
use XML syntax to write our JSPs. JSPs generated by the NetBeans Visual Web editor
use the second approach.
When using XML syntax, instead of using a <%@ taglib%> directive, we use XML
namespaces to include tag libraries in the JSP. Notice that the generated JSP markup
uses the standard HTML JSF tag library. Additionally, it uses a custom JSF library
with a URI of http://www.sun.com/webui/webuijsf . This tag library contains all
the custom components see in the Palette window.
The custom tag library used by NetBeans Visual Web is known as the
Woodstock Tag Library , more information about this library can be
found at https://woodstock.dev.java.net/ .
We can add markup directly into the JSP, and when we go back to the design view
it should update accordingly. As we can see from the markup above, the attributes
we set in the Properties window are attributes of the custom JSP tags used by
visual web.
Sometimes it is faster to set the attributes directly in the markup rather
than using the properties window, since we can use NetBeans code
completion ( Ctrl+Space ) this way, saving us from scrolling up and down
the properties window in order to find a property we wish to modify.
 
Search WWH ::




Custom Search