Java Reference
In-Depth Information
<jsp:setProperty name="EmpBean" property="exemptions" param="exmpDDM"/>
<jsp:setProperty name="EmpBean" property="empZip" param="zipTF"/>
<jsp:setProperty name="EmpBean" property="empState" param="stateTF"/>
<jsp:setProperty name="EmpBean" property="payRate" param="hPRTF"/>
<jsp:setProperty name="EmpBean" property="empName" param="empNameTF"/>
<jsp:setProperty name="EmpBean" property="empCity" param="cityTF"/>
</jsp:useBean>
with these start and end tags for the custom tag:
<TNT:getEmp>
</TNT:getEmp>
Remember, the bean tags are being deleted because CrtEmpBean's doStartTag method will perform these
functions (with the help of the EmpExtractor and PageContext objects).
10.
Save EnterEmpInfoJSP.
Time to test.
11.
Run c11/EnterEmpInfoJSP on the server.
12.
Specify the employee name as joe, pay rate as 10, select Display and click the Submit
button.
The browser window should look like Figure 11-1 .
Figure 11-1.
Although not very pretty, this proves that the Employee bean was created and that DispEmpInfoJSP was able to
access the bean. More important, this means that the custom tag, getEmp, worked!
Search WWH ::




Custom Search