Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Eclipse Web Tools Platform Project (WTP) » [Resolved]How to set the breakpoint for a JSP file(When trying to set a breakpoint, a 'bookmark' gets set)
[Resolved]How to set the breakpoint for a JSP file [message #1836163] Tue, 22 December 2020 21:45 Go to next message
Jim Anderson is currently offline Jim AndersonFriend
Messages: 109
Registered: October 2014
Senior Member
I am running Eclipse WTP 2020-09. It took a week or more to get Eclipse running, but I have been running it for over a week now and have been making good progress in debugging my java code. While debugging the java code, I have been ignoring obvious problems in the display of the webpage.

It is interesting that the results of the JSP code appear correctly when I run the webpage using Tomcat 9.0 outside of Eclipse. When I run the same code inside Eclipse, I am getting errors. I'm guessing this is a configuration problem in Eclipse.

Today, I started to try to debug the JSP code inside of Eclipse. In the project explorer, I double clicked on the JSP file that I want to debug and the source code is displayed in a widow tab next to other (java) source code windows.

In the java windows, I can double-click the line number and a break point gets set for that line.

In the JSP window, in a javascript scripting section of the code, I double-click the line number and a "Add Bookmark" window pops-up. I add a name and click "OK" and a bookmark gets set, with a small blue rectangle next the line number. I'm not sure what the bookmark is used for, but I can look that up later. What I really want is that the double-click creates a breakpoint in the JSP code, just as it does for java.

If I right-click on a JSP source line, the pop-up menu does not display a choice to add a breakpoint.

Can someone help?

[Updated on: Wed, 23 December 2020 15:25]

Report message to a moderator

Re: How to set the breakpoint for a JSP file [message #1836166 is a reply to message #1836163] Wed, 23 December 2020 01:56 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

A bookmark is the kind of marker that you'll see in the Bookmarks view. It doesn't interrupt program execution or anything, it's just a way for you to mark a location in your files so that you can easily get back there later. Unlike Tasks, you always have to create them manually.

You can only set Java breakpoints in lines that would become executing Java source code, everything else like JavaScript is just template code output to the browser as-is, without any debug information added to the final class file (usually). The source file's line has to have a scriptlet, expression, declaration, or a JSP standard or custom action, as those will become Java statements/expressions and be compiled by the server. The toggle option appears over the vertical ruler, the same place where the bookmarks/breakpoints show up on the left. We just never decided to show it in the context menu since the other marker types aren't usually shown their either.

Sharing what unresolved error messages you see is a first step in resolving them.


_
Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Wed, 23 December 2020 01:58]

Report message to a moderator

Re: How to set the breakpoint for a JSP file [message #1836185 is a reply to message #1836166] Wed, 23 December 2020 13:29 Go to previous messageGo to next message
Jim Anderson is currently offline Jim AndersonFriend
Messages: 109
Registered: October 2014
Senior Member
No Message Body
Re: How to set the breakpoint for a JSP file [message #1836188 is a reply to message #1836185] Wed, 23 December 2020 15:24 Go to previous message
Jim Anderson is currently offline Jim AndersonFriend
Messages: 109
Registered: October 2014
Senior Member
@Nitin

Thanks for your explanation. I had to read it a few times carefully, but I do understand now and I will close out this thread.

I have another issue, but I will save that for a different thread.

Thank you, again!

Jim A.






Previous Topic:[Resolved]HTTP status 404 - Not found for my project
Next Topic:output from JSP console.log statements
Goto Forum:
  


Current Time: Thu Apr 25 15:08:42 GMT 2024

Powered by FUDForum. Page generated in 0.03072 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top