- This topic has 5 replies, 2 voices, and was last updated 19 years ago by
Riyad Kalla.
-
AuthorPosts
-
myeclipseuser1MemberHi,
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 1environment: myeclipse 4 , tomcat 5 and jdk 5
Riyad KallaMemberAre 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.
myeclipseuser1MemberRiyad,
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
Riyad KallaMemberI 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.
myeclipseuser1MemberYou are right. It works with myeclipse 4.1.1. But fails with 4.0.
thanks,
My Eclipse user 1
Riyad KallaMemberGlad it’s working now.
-
AuthorPosts