blob: 9f39faffe00e29bd970a5593c4a903ef618e6026 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../../../../wtp.xsl"?>
<html>
<head>
<meta name="root" content="../../../../../" />
<title>JSP Breakpoint Test</title>
</head>
<body>
<h2>JSP Breakpoints</h2>
<h3><b>Prerequisites</b></h3>
<p>
must have an Apache Tomcat server installed
</p>
<h3><b>Create a server</b></h3>
<p>
- Window > Preferences > Server > Installed Runtimes
<br/> - Add...
<br/> - choose the appropriate version of Apache Tomcat
<br/> - Point to your appropriate Tomcat directory
</p>
<h3><b>Create a J2EE module</b></h3>
<p>
- File > New > Project
<br/> - Web > J2EE Web Module
<br/> - use the Tomcat server you just added as the Target server
</p>
<h3><b>Create a JSP</b></h3>
<p>
- in the WebContent folder of your project
<br/> - create breakpoint-test.jsp file with these contents
<br/>
<pre>
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;breakpoint test&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;%
String test = "test";
for (int i = 0; i &lt; 5; i++) {
out.println(test);
}
%&gt;
&lt;p&gt;a paragraph&lt;/p&gt;
&lt;%
out.println("another");
// some comments
out.println("block");
out.println("of");
out.println("code");
// comment at the end %&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
</p>
<h3><b>Add some breakpoints</b></h3>
<p>
in scriplet sections of breakpoint-test.jsp:
<br/> - double click in the left hand ruler in some of the scriplet sections to add breakpoints.
<br/> - or right click in the ruler and select "toggle breakpoints"
</p>
<h3><b>Add the server</b></h3>
<p>
open the servers view:
<br/> - Window > Show View > Other...
<br/> - Server > Servers
<br/> - right click (in the servers view) > New > server
<br/> - select the appropriate variety of Tomcat server
<br/> - add your J2EE module to this server
</p>
<h3><b>Debug on server</b></h3>
<p>
right click on the breakpoint-test.jsp file in the package explorer
<br/> - select "Debug on Server"
<br/> - the server should start, and you should be switched to
the debug perspective
<br/> - you should be able to step through the breakpoints
<br/> - you should be able to reload the page to start debugging
<br/> - try adding/removing breakpoints, reloading the page
<br/> - you should be able to see/enable/disable the breakpoints in the brekpoints view
<br/>
<br/>
</p>
<h2>Source Editing Test Plans</h2>
<p>
<a href="../../../../wst/components/sse/M4/milestone_test_plan.html">org.eclipse.wst.sse</a>
<br/><a href="../../../../wst/components/xml/M4/milestone_test_plan.html">org.eclipse.wst.xml</a>
<br/><a href="../../../../wst/components/html/M4/milestone_test_plan.html">org.eclipse.wst.html</a>
<br/><a href="../../../../wst/components/css/M4/milestone_test_plan.html">org.eclipse.wst.css</a>
<br/><a href="../../../../wst/components/dtd/M4/milestone_test_plan.html">org.eclipse.wst.dtd</a>
<br/><a href="../../../../wst/components/javascript/M4/milestone_test_plan.html">org.eclipse.wst.javascript</a>
<br/><a href="../../../../jst/components/jsp/M4/milestone_test_plan.html">org.eclipse.jst.jsp</a>
</p>
</body>
</html>