JSP Breakpoints
Status of this Document
Date Comments
6.21.06 Test moved to new location
04.15.05 Test created

must have an Apache Tomcat server installed

Create a server

- Window > Preferences > Server > Installed Runtimes
- Add...
- choose the appropriate version of Apache Tomcat
- Point to your appropriate Tomcat directory

Create a J2EE module

- File > New > Project
- Web > J2EE Web Module
- use the Tomcat server you just added as the Target server

Create a JSP

- in the WebContent folder of your project
- create breakpoint-test.jsp file with these contents


				<head> <title>breakpoint test</title>


				<% String test = "test"; for (int i = 0; i < 5;
				i++) { out.println(test); } %>

				<p>a paragraph</p>

				<% out.println("another"); // some comments
				out.println("block"); out.println("of");
				out.println("code"); // comment at the end %>



Add some breakpoints

in scriplet sections of breakpoint-test.jsp:
- double click in the left hand ruler in some of the scriplet sections to add breakpoints.
- or right click in the ruler and select "toggle breakpoints"

Add the server

open the servers view:
- Window > Show View > Other...
- Server > Servers
- right click (in the servers view) > New > server
- select the appropriate variety of Tomcat server
- add your J2EE module to this server

Debug on server

right click on the breakpoint-test.jsp file in the package explorer
- select "Debug on Server"
- the server should start, and you should be switched to the debug perspective
- you should be able to step through the breakpoints
- you should be able to reload the page to start debugging
- try adding/removing breakpoints, reloading the page
- you should be able to see/enable/disable the breakpoints in the brekpoints view

Source Editing Test Plans