When executed as part of a web application, a JSP page is actually translated into a servlet, called the generated servlet, which is then compiled and run. You can set breakpoints in JSP pages in either the JSP source file or in the generated servlet.
To debug a JSP page:
Open the JSP file in the source editor. Move the cursor to a line and in the IDE, choose Debug -> Toggle Breakpoint.
The line in the source editor changes its background color indicating that breakpoint has been set.
Right-click inside the source editor and choose Compile.
Execution of the JSP page stops at the breakpoint, and the line in the source editor is highlighted indicating that execution stopped at that line.
In the Call Stack view, expand the _jasper._
JSP file name._jspService
node.
Under the node, you can see the variables for the JSP file. Change variable values as desired and in the IDE, choose Debug -> Continue. The debugger now continues execution of the JSP file with the new variable values.
The breakpoint is removed from the line, and its background color resets to the normal editing color.
See also | |
Debugging the Application Preparing the Web Module for Debugging Starting and Stopping the Debugger Debugging EJBs |