Java Reference
In-Depth Information
The JSP will display the following:
The tax amount for Joe Programmer
$139.50
Because DispEmpTaxAmtJSP used the bean created by EnterEmpInfoJSP, it proves that the bean is accessible by
other JSPs.
Results of the Tutorial
Let's go over the results:
1.
In the TutorialsWeb/WebContent folder, three JSP files:
DispEmpInfoJSP DispEmpGrossJSP DispEmpTaxAmtJSP
and two HTML files:
Howdy EnterEmpInfoForm
2.
In TutorialsWeb/WebContent, a folder called c9 containing three files:
EnterEmpInfoForm.html EnterEmpInfoJSP.jsp HowdyJSP.jsp
3.
In TutorialsWeb/Java Resources/src, a folder called c9java containing two java files:
Employee EmpExtractor
4.
In the TutorialsWeb/ Java Resources/src/default package, two java files:
EmpServlet MyServlet
Review Questions
1.
What is a JSP?
2.
What rules must a java class follow to be a Java bean?
3.
What is the MVC?
4.
How are JSPs and servlets related?
5.
Why are JSP JSTL and bean tags preferred over scriptlets and expressions?
6.
What are the advantages of JSPs over Java servlets?
7.
Explain the difference between a response's redirect method and a request dispatcher's
forward method.
 
Search WWH ::




Custom Search