Java Reference
In-Depth Information
Debugging Assignment
The Debug.jsp program is a JSP that displays some simple output. The program
has several syntax, semantic, or logic errors in the program code. Perform the
following steps to debug the program.
1. Start TextPad and open the file, Debug.jsp, from the Chapter12 folder on the
Data Disk.
2. Read through the code and fix any errors that you see. Insert today's date
and your name as the programmer in the comment header.
3. Save the file. Start Tomcat.
4. Copy the JSP file to the Tomcat default root folder, or a location specified by
your instructor. Open a browser and type http://localhost:8080/
Debug.jsp in the address text box.
5. When the program compiles, the browser displays the compilation errors.
Fix the first error and then repeat Step 4.
6. When you have fixed all the syntax and semantic errors so that the program
will execute, look for run-time and logic errors. Fix all errors, if any, and
execute the program again.
7. When the program produces the output as shown in Figure 12-92, print a
copy of the source code. Close the browser. Close TextPad. Stop Tomcat.
FIGURE 12-92
Search WWH ::




Custom Search