blob: c93fe8528efd2f41e879452bfab999facd1991e3 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="Copyright (c) 2000, 2011 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-2.0/. Contributors: IBM Corporation - initial API and implementation" />
<meta name="DC.rights.owner" content="(C) Copyright 2000, 2011" />
<meta content="public" name="security" />
<meta content="index,follow" name="Robots" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta content="task" name="DC.Type" />
<meta name="DC.Title" content="Debugging a JSP file on a server" />
<meta name="abstract" content="The debugger enables you to detect and diagnose errors in your application. It allows you to control the execution of your program by setting breakpoints, suspending threads, stepping through the code, and examining the contents of the variables. You can debug a JavaServer Pages (JSP) without losing the state of your application." />
<meta name="description" content="The debugger enables you to detect and diagnose errors in your application. It allows you to control the execution of your program by setting breakpoints, suspending threads, stepping through the code, and examining the contents of the variables. You can debug a JavaServer Pages (JSP) without losing the state of your application." />
<meta content="JSP files, debugging, servers, debugging JSP files" name="DC.subject" />
<meta content="JSP files, debugging, servers, debugging JSP files" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../topics/tdebug.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="tdbgjsp_wst" name="DC.Identifier" />
<meta content="en-us" name="DC.Language" />
<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
<title>Debugging a JSP file on a server</title>
</head>
<body id="tdbgjsp_wst"><a name="tdbgjsp_wst"><!-- --></a>
<h1 class="topictitle1">Debugging a JSP file on a server</h1>
<div><p>The debugger enables you to detect and diagnose
errors in your application. It allows you to control the execution of your
program by setting breakpoints, suspending threads, stepping through the code,
and examining the contents of the variables. You can debug a JavaServer Pages
(JSP) without losing the state of your application. </p>
<div class="section" id="tdbgjsp_wst__tdbgjsp_context"><a name="tdbgjsp_wst__tdbgjsp_context"><!-- --></a>To debug a JSP file on a server:</div>
<ol>
<li class="stepexpand" id="tdbgjsp_wst__tdbgjsp_step1"><a name="tdbgjsp_wst__tdbgjsp_step1"><!-- --></a><span>In the Project Explorer view, open your JSP
file.</span> In a Web project, JSP files are located in the Web Content
folder. Double-click the JSP file, the file opens in an editor.</li>
<li class="stepexpand" id="tdbgjsp_wst__tdbgjsp_step2"><a name="tdbgjsp_wst__tdbgjsp_step2"><!-- --></a><span>To set one or more breakpoints, you can select
a line of code in the editor and double-click the marker bar directly to the
left of the line where you want to add the breakpoint.</span></li>
<li class="stepexpand" id="tdbgjsp_wst__tdbgjsp_step3"><a name="tdbgjsp_wst__tdbgjsp_step3"><!-- --></a><span>From the JSP file's context menu in the Project
Explorer view, click <span class="uicontrol">Debug As&gt; Debug on Server.</span> The
workbench switches to the Debug perspective and the server is launched in
debug mode.</span></li>
<li class="stepexpand" id="tdbgjsp_wst__tdbgjsp_step4"><a name="tdbgjsp_wst__tdbgjsp_step4"><!-- --></a><span>In the Debug view, step through the code and
make the necessary changes to the JSP file.</span> For detailed information
on debugging, refer to the Debugging Java™ applications documentation.
</li>
<li class="stepexpand" id="tdbgjsp_wst__tdbgjsp_step5"><a name="tdbgjsp_wst__tdbgjsp_step5"><!-- --></a><span>Save the JSP file.</span></li>
<li class="stepexpand" id="tdbgjsp_wst__tdbgjsp_step6"><a name="tdbgjsp_wst__tdbgjsp_step6"><!-- --></a><span>Click the <span class="uicontrol">Refresh</span> icon
in the Web Browser to update the changes.</span> The state of your application
is not lost and the server recognizes your changes.</li>
</ol>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="../topics/tdebug.html" title="You can debug applications on a server to detect and diagnose errors in your application. Use the TCP/IP monitor view to view data sent and received over the ports of the server. In addition, use the debugging tools in the workbench to control running your application on the server by setting breakpoints, suspending threads, stepping through the code, and examining the contents of the variables. You can debug the following artifacts on a server without losing the state of your application:">Debugging applications on a server</a></div>
</div>
</div>
</body>
</html>