Java Reference
In-Depth Information
1.
In the Design view, edit DispEmpInfoJSP so that it contains text and a table like Figure 9-6 .
Figure 9-6.
2.
Change to the Source view.
3.
Add the following statement to the end of DispEmpInfoJSP's page directive (the page
directive is toward the beginning of the source code):
import="c9java.*"
Because DispEmpInfoJSP will be using Employee and EmpExtractor objects, we have to import c9java. (If Employee
and EmpExtractor were in the default package of the JavaResources folder, no import statement would have been required.)
4.
After the page directive, add the following scriptlet:
<jsp:scriptlet> Employee emp;
EmpExtractor ee = new EmpExtractor();
emp = ee.getEmployeeInstance(request);
</jsp:scriptlet>
This scriptlet creates:
A.
An Employee variable called emp
B.
An EmpExtractor variable called ee
C.
An EmpExtractor object
 
Search WWH ::




Custom Search