Why Can't I Debug into My JSP File That is Included in Another JSP File With an Include Tag?

Abstract: Why Can't I Debug into My JSP File That is Included in Another JSP File With an Include Tag?

Issue:

When including JSP files into another JSP with the <%@ include file = file.jsp %> tag, JBuilder won't step into the code of the included JSP even if it has valid breakpoints.

Solution:

Instead of using the include tag to include your file, you can use the Page Context object like so:

<%
String banner = "banner.jsp";
pageContext.include(banner);
%> The way the JBuilder does its debugging is such that it'll ignore any tag as a viable breakpoint. In doing this, it is skipping over the whole inserted jsp. If you include the page as part of your java code you can debug into the source of the JSP.