facebook

[Closed] jsp debugging issue with myeclipse

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

    Hi,
    I have a webproject which uses same file name in two directories. If i put a breakpoint at one of the jsp, both jsps are getting debug enabled at the same position. Is there anyway i can set myeclipse to enable debug only for one of the jsps?

    Example:
    \webroot\f1\myjsp.jsp
    [content]

    <%@ page language=”java” import=”com.ram.test.*” pageEncoding=”UTF-8″%>
    <jsp:useBean id=”myname” class=”com.ram.test.TestClass” scope = “page”/>

    <%
    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 ‘MyJsp.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>
    <%

    for (int i=0;i<10;i++){
    out.println(“printing i”+i+”<br>”);
    }
    %>
    </body>
    </html>

    ———————————————————————————————————-

    \webroot\f2\myjsp.jsp

    [content]

    <%@ page language=”java” import=”com.ram.test.*” pageEncoding=”UTF-8″%>
    <jsp:useBean id=”myname” class=”com.ram.test.TestClass” scope = “page”/>

    <%
    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 ‘MyJsp.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>
    <%

    for (int j=0;j<10;j++){
    out.println(“printing j”+j+”<br>”);
    }
    %>
    </body>
    </html>

    —————————————————————————————————–

    if i put breakpoint at \webroot\f1\myjsp.jsp, the debug is getting enabled even when i access \webroot\f2\myjsp.jsp at the same location which is annoying.

    Any suggestion is appreciated.

    Thanks,
    Myeclipse user 1

    environment: myeclipse 4 , tomcat 5 and jdk 5

    #249866 Reply

    Riyad Kalla
    Member

    Are the files in different projects or in the same project? If they are in different proejcts, close the project you aren’t debugging. If they are in the same project, then this sounds like a bug as it should be able to tell the difference.

    #249991 Reply

    Riyad,
    Both files are belong to same project. Please try creating a simple webproject and place the given jsp files and test it. I am using my eclipse 4.0 for my development.

    Thanks
    My eclipse user1

    #249998 Reply

    Riyad Kalla
    Member

    I did try this before I responded, the reason I was asking you to clarify is because setting up a single project, with directories F1/F2 under the webroot and copy-pasting the same MyJsp.jsp file into both and setting break points in both on the same line did not cause a problem.

    I’m using MyEclipse 4.1.1 on Eclipse 3.1.2, it’s possible this was a bug that has been fixed since you installed MyEclipse.

    #250114 Reply

    You are right. It works with myeclipse 4.1.1. But fails with 4.0.
    thanks,
    My Eclipse user 1

    #250116 Reply

    Riyad Kalla
    Member

    Glad it’s working now.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: [Closed] jsp debugging issue with myeclipse

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