Java Reference
In-Depth Information
How is the TagSupport class used when creating a custom tag?
7.
Name two methods inherited from the TagSupport class.
8.
Review Exercise
The Shipment application will be modified to insert, display, and delete shipment information in a DBMS using
custom tags. This will require:
A.
Three new tags called crtShipBean, insShip, and delShip
Three TagSupport subclasses called CrtShipBean, InsertShip, and DeleteShip
B.
C.
Five JSPs and two Web pages to perform the View component of the application.
1.
In ReviewExWeb/WebContent, create a new folder called c11.
2.
In c11, create the following files:
DispShip.jsp
DisplayShip.jsp
ConfirmDel.jsp
DelShip.jsp
ConfirmIns.jsp
EnterShipNum.html
ConfirmDel.html
3.
Copy EnterShipInfoJSP from WebContent/c9 into c11.
4.
In ReviewExWeb/Java Resources/src, create a new folder called c11.
In Java Resources: src/c11, create the following Java classes as TagSupport subclasses with
no method stubs:
5.
CrtShipBean InsertShip DeleteShip
6.
Copy Shipment.java and DBAccess.java from ReviewEx/src/c10 to Java Resources/src/c11.
7.
In Web Content/WEB-INF/, create a new folder called tls and in tls a new file called TNT.tld.
8.
In TNT.tld, add the XML to define three tags called crtShipBean, insShip, and delShip and
associate them with the appropriate Java classes.
9.
Add the XML to define a required attribute called source for the crtShipBean tag.
Create a deployment descriptor stub and add http://www.tnt.com/taglib as tag library
reference URI and /WEB-INF/tls/TNT.tld as the location of the tab library.
10.
11.
In c11/EnterShipInfoJSP, change the form action from /ReviewExWeb/ShipInfoServlet to
EnterShipInfoJSP.jsp.
 
Search WWH ::




Custom Search