Download View - ITtestpapers.com
Transcript
EXAMPLES The query tag implemented by this tag handler could be used in either of the following ways: <tt:connection id="con01" ....> ... </tt:connection> <tt:query id="balances" connection="con01"> SELECT account, balance FROM acct_table where customer_number = <%= request.getCustno()%> </tt:query> <tt:connection ...> <x:query id="balances"> SELECT account, balance FROM acct_table where customer_number = <%= request.getCustno()%> </x:query> </tt:connection> The TLD for the tag handler must indicate that the connection attribute is optional with the following declaration: <tag> ... <attribute> <name>connection</name> <required>false</required> </attribute> </tag> Examples The custom tags described in this section demonstrate solutions to two recurring problems in developing JSP applications: minimizing the amount of Java programming in JSP pages and ensuring a common look and feel across applications. In doing so, they illustrate many of the styles of tags discussed in the first part of the chapter. An Iteration Tag Constructing page content that is dependent on dynamically generated data often requires the use of flow control scripting statements. By moving the flow control logic to tag handlers, flow control tags reduce the amount of scripting needed in JSP pages. 137
Related documents
The Java™ Web Services Tutorial
The J2EE™ 1.4 Tutorial
The Java™ Web Services Tutorial
THE J2EE™ 1.4 Tutorial in NetBeans
WebLogic Web Service
The J2EE™ Tutorial
Remote Lectures - Final Report
MANUEL D`UTILISATION SOUS WINDOWS
Siemens S75 User's Manual
Wiley Java 2 Enterprise Edition 1.4 (J2EE 1.4) Bible