facebook

Jsp debugging not working

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #273746 Reply

    AHC
    Member

    I 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+debugger

    I’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:

    http://www.myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/webprojects/index.html

    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-1330

    Eclipse Platform
    Version: 3.2.2.r322_v20070119-RQghndJN8IM0MsK
    Build id: M20070212-1330

    Eclipse Java Development Tools
    Version: 3.2.2.r322_v20070104-R4CR0Znkvtfjv9-
    Build id: M20070212-1330

    Eclipse Graphical Editing Framework
    Version: 3.2.2.v20070208
    Build id: 20070208-1315

    Eclipse RCP
    Version: 3.2.2.r322_v20070104-8pcviKVqd8J7C1U
    Build id: M20070212-1330

    Eclipse Plug-in Development Environment
    Version: 3.2.1.r321_v20060823-6vYLLdQ3Nk8DrFG
    Build id: M20070212-1330

    Eclipse Project SDK
    Version: 3.2.2.r322_v20070104-dCGKm0Ln38lm-8s
    Build id: M20070212-1330

    Eclipse Graphical Editing Framework
    Version: 3.2.2.v20070208
    Build id: 20070208-1315

    Eclipse 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

    #273756 Reply

    Loyal Water
    Member

    Are you trying to add the break point on html tags by any chance ?

    Are you able to add break points to a Java file ?

    #273761 Reply

    AHC
    Member

    @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

    #273813 Reply

    Loyal Water
    Member

    Can you paste your file here for me and point out the line where you are unable to add the break point.

    #273823 Reply

    AHC
    Member

    @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

    #273824 Reply

    AHC
    Member

    I just can add a bookmark.

    I followed the steps of this tutorial: Working With Web Projects – Quickstart

    Thanks for your help!

    Alex

    #273861 Reply

    Loyal Water
    Member

    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.

    
    <%@ 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>
    
    
    #273871 Reply

    AHC
    Member

    @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

    #273932 Reply

    Loyal Water
    Member

    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 ?

    #273942 Reply

    AHC
    Member

    @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

    #273956 Reply

    Loyal Water
    Member

    We are sorry for the confusion. We need to update the docs. Thanks for bringing this to our notice.

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Jsp debugging not working

You must be logged in to post in the forum log in