Running the application in Debug mode

Now, let's run the listCourse.jsp page in Debug mode:

  1. In Project Navigator, go to src/main/webapp/listCourse.jsp and right-click on the file. Select Debug As | Debug on Server. Eclipse may prompt you to use the existing debug server:
Figure 6.6: Choosing an existing debug server
  1. Click Finish. Eclipse will ask you if you want to switch to the Debug perspective (refer to Chapter 1, Introducing JEE and Eclipse, for a discussion on Eclipse perspectives):
Figure 6.7: Auto-switching to the Debug perspective
  1. Select the Remember my decision option and click the Yes button. Eclipse will switch to the Debug perspective. Eclipse will try to open the page in the internal Eclipse browser, but it won't display the page immediately. Recall that listCourse.jsp calls Course.getCourses(), which in turn calls CourseDAO.getCourses(). We have set a breakpoint in the CourseDAO.getCourses() method, so the execution of the page stops there:

Figure 6.8: The debugger paused at a breakpoint
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.134.198