- This topic has 10 replies, 2 voices, and was last updated 17 years, 8 months ago by
Loyal Water.
-
AuthorPosts
-
AHCMemberI can’t set a breakpoint in jsp files, I just can add a bookmark.
This issue was posted here:
https://www.genuitec.com/forums/topic/jsp-debugging-using-jetty-myeclipse-5-5/&highlight=jsp+debuggerI’m having the same problem, but in my case, I never can set a breakpoint.
In order to be safe I create a new web project following this tutorial:
Thanks,
Alex
P.S. My config is:
Tomcat 5.x
** System properties:
OS=Linux
OS version=2.6.20-15-generic
Java version=1.5.0_10*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 5.5.1 GA
Build id: 20070521-5.5.1-GA*** Eclipse details:
Eclipse SDK
Version: 3.2.2
Build id: M20070212-1330Eclipse Platform
Version: 3.2.2.r322_v20070119-RQghndJN8IM0MsK
Build id: M20070212-1330Eclipse Java Development Tools
Version: 3.2.2.r322_v20070104-R4CR0Znkvtfjv9-
Build id: M20070212-1330Eclipse Graphical Editing Framework
Version: 3.2.2.v20070208
Build id: 20070208-1315Eclipse RCP
Version: 3.2.2.r322_v20070104-8pcviKVqd8J7C1U
Build id: M20070212-1330Eclipse Plug-in Development Environment
Version: 3.2.1.r321_v20060823-6vYLLdQ3Nk8DrFG
Build id: M20070212-1330Eclipse Project SDK
Version: 3.2.2.r322_v20070104-dCGKm0Ln38lm-8s
Build id: M20070212-1330Eclipse Graphical Editing Framework
Version: 3.2.2.v20070208
Build id: 20070208-1315Eclipse startup command=-os
linux
-ws
gtk
-arch
x86
-launcher
/home/user/projects/eclipse/eclipse
-name
Eclipse
-showsplash
600
-exitdata
1b8000
-clean
-vm
/usr/local/bin/java
Loyal WaterMemberAre you trying to add the break point on html tags by any chance ?
Are you able to add break points to a Java file ?
AHCMember@support-nipun wrote:
Are you trying to add the break point on html tags by any chance ?
Yes, I tried to add the break point on html tags but it did not work either.
@support-nipun wrote:
Are you able to add break points to a Java file ?
Yes, I am be able to add break points to a java file. The problem is just with the jsp files.
Any idea?
Thanks,
Alex
Loyal WaterMemberCan you paste your file here for me and point out the line where you are unable to add the break point.
AHCMember@support-nipun wrote:
Can you paste your file here for me and point out the line where you are unable to add the break point.
Yes, of course.
Here is the file:
<%@ page language=”java” import=”java.util.*” pageEncoding=”UTF-8″%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+”://”+request.getServerName()+”:”+request.getServerPort()+path+”/”;
%><!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<base href=”<%=basePath%>”><title>My JSP ‘helloWorldWeb.jsp’ starting page</title>
<meta http-equiv=”pragma” content=”no-cache”>
<meta http-equiv=”cache-control” content=”no-cache”>
<meta http-equiv=”expires” content=”0″>
<meta http-equiv=”keywords” content=”keyword1,keyword2,keyword3″>
<meta http-equiv=”description” content=”This is my page”>
<!–
<link rel=”stylesheet” type=”text/css” href=”styles.css”>
–></head>
<body>
This is my JSP page. <br>
Welcome to the world of JSP<br> <<! In this line I am not able to set the break point–>>
</body>
</html>I
AHCMemberI just can add a bookmark.
I followed the steps of this tutorial: Working With Web Projects – Quickstart
Thanks for your help!
Alex
Loyal WaterMemberAhhh … You have add break points to JSP code. You cannot add break points to HTML code. Try adding a scriptlet to your file and try adding break points.
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><title>JSP Test</title> <%! String msg = "Hello, World."; %> </head> <body> <h2><%= msg %></h2> <%= new java.util.Date() %> </body></html>
AHCMember@support-nipun wrote:
Ahhh … You have add break points to JSP code. You cannot add break points to HTML code. Try adding a scriptlet to your file and try adding break points.
Sorry, but I don’t understand you.
I just followed the steps of the tutorial: Working With Web Projects – Quickstart
“Figure 24. Setting JSP breakpoint “. In this picture, a breakpoint was set to a jsp page.
I am not being able to reproduce the example…and I think that it shoube be working.
Do you have any idea about what could be happening?
Thanks, Alex
Loyal WaterMemberAlex,
The tutorial says you can add breakpoints to a jsp page which is correct. Please note the line where the break point is added in the tutorial. Im sure it would be a scriptlet or some jsp code. Replicate the code in the tutorial at your end and try adding the break point at the same line. Did it work ?
AHCMember@support-nipun wrote:
Alex,
The tutorial says you can add breakpoints to a jsp page which is correct. Please note the line where the break point is added in the tutorial. Im sure it would be a scriptlet or some jsp code. Replicate the code in the tutorial at your end and try adding the break point at the same line. Did it work ?Such as you told me, if I try adding a scriptlet to my jsp file, it works! But it is not working if I try adding a break point to my HTML code.
I checked the line where the break point is added in the tutorial (Figure 24. Setting JSP breakpoint – Working With Web Projects – Quickstart) and It seems that it was added in HTML code. Please tell me If I am wrong!
Thanks, Alex
Loyal WaterMemberWe are sorry for the confusion. We need to update the docs. Thanks for bringing this to our notice.
-
AuthorPosts