For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 11 replies, 2 voices, and was last updated 18 years, 3 months ago by
Loyal Water.
-
AuthorPosts
-
biiasuoMemberhi!
I have a web project now.
I can debug a java class,but I cannot debug a jsp file.
I can add a breakpoint in a jsp file,however,when runing the jsp file in ie,the debugger just cannot hit the breakpoint.It seems that there’s no breakpoint in the jsp file at all.My web server is Weblogic8.1 and the version of myeclispe is:5.1.0 GA
Can anyone help me?Thx a lot~<%@ page language="java" import="java.util.*,com.tjpu_d508.dbclasses.*,java.sql.*" 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> <base href="<%=basePath%>"> <title>My JSP 'test.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 test JSP page. <br> <% DatabaseConnection db=new DatabaseConnection(); ResultSet rs=db.query("select * from testtable"); // this is where I add a breakpoint String str=null; if(rs.next()) { str=rs.getString(2); //System.out.println(str); } db.dbClose(); %> <%=str %> </body> </html>August 20, 2007 at 11:13 am #274101
Loyal WaterMemberWas JSP debugging working earlier ? Can you switch to a brand new workspace and try debugging the JSP page again.
Also, make sure you start the weblogic server in debug mode.
August 21, 2007 at 2:30 am #274136
biiasuoMember@support-nipun wrote:
Was JSP debugging working earlier ? Can you switch to a brand new workspace and try debugging the JSP page again.
Also, make sure you start the weblogic server in debug mode.
No,i have nerver debuged a jsp file with myeclipse before.uauslly,i just debuged a java class.I have tried a different workspace,but nothing happened .How could i start the weblogic server in debug mode?Do you mean “Window->Preferences->Application Servers->WebLogic 8->Launch->debug mode“.My “Optional Java Vm arguments” is like
“-ms64m
-mx64m
-Djava.library.path=”D:/BEA/weblogic81/server/bin”
-Dweblogic.management.discover=false
-Dweblogic.ProductionModeEnabled=false
“August 21, 2007 at 9:24 am #274155
Loyal WaterMemberDo you mean “Window->Preferences->Application Servers->WebLogic 8->Launch->debug mode”.
Yes, thats what I meant.
Also make sure you setup WebLogic 8 to support JSP debugging as noted here:
https://www.genuitec.com/forums/topic/weblogic-8-jsp-debugging-is-broken-but-it-supports-jsr-45/August 21, 2007 at 8:50 pm #274184
biiasuoMember@support-nipun wrote:
Do you mean “Window->Preferences->Application Servers->WebLogic 8->Launch->debug mode”.
Yes, thats what I meant.
Also make sure you setup WebLogic 8 to support JSP debugging as noted here:
https://www.genuitec.com/forums/topic/weblogic-8-jsp-debugging-is-broken-but-it-supports-jsr-45/Thx a lot.I have done all that above before,but myeclipse still cannot debug jsp.
By the way,there’s a warning when starting weblogic,which is like “Warning> <HTTP> <BEA-101248> <[network2007]: Deployment descriptor “web.xml” is malformed. Check against the DTD: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element ‘web-app’. (line 2, column 222).> “.Can you tell me why? Thanks very much~August 22, 2007 at 7:22 am #274205
Loyal WaterMemberDoes the server start without errors when started outside MyEclipse ?
This is something I found in another post where the user was facing a similar problem. You can try this out as well.
My guess is that your web.xml file is actually a Web 2.4 specification file (look at the top, are you referencing a schema? If you open your project properties, does it say J2EE 1.4 version under MyEclipse-Web?) and WebLogic 8 only supports J2EE 1.3, not 1.4.
You can create a new J2EE 1.3 project when you create a new web project, be sure to select the correct version of the J2EE spec you wish to follow (default is 1.4)
August 22, 2007 at 10:20 pm #274333
biiasuoMemberToday,I found that there were 2 kinds of breakpoints in jsp file.One is just a blue ball which appears in the margin of the left,
the other is a blue ball with a right mark .Only when the “blue ball with a right mark” appears in the left margin,the program will stop at the breakpoint,the jsp file can be debuged.
why?what is the differnece between the 2 kind of breakpoints?ThxAugust 23, 2007 at 10:27 am #274395
Loyal WaterMember“blue ball” == breakpoint marker
“blue ball with check box” == break point that is confirmed by the server as break-able.For example, if you set a breakpoint in a JSP page for an app server that cannot debug JSP pages, the break point will never get a check box.
August 23, 2007 at 8:00 pm #274425
biiasuoMember@support-nipun wrote:
“blue ball” == breakpoint marker
“blue ball with check box” == break point that is confirmed by the server as break-able.For example, if you set a breakpoint in a JSP page for an app server that cannot debug JSP pages, the break point will never get a check box.
thanks for explaining it for me~my app server is weblogic all the time.
Did you mean that not every line of jsp scriptlet could be debugged?August 24, 2007 at 1:40 pm #274498
Loyal WaterMemberIt depends on the app server. When a breakpoint is added, the debugger checks with the server in the background to see if that line can be broken on.
August 25, 2007 at 1:47 am #274536
biiasuoMember@support-nipun wrote:
It depends on the app server. When a breakpoint is added, the debugger checks with the server in the background to see if that line can be broken on.
Thx nipun.
To help me to debug a jsp file,you have given me a weblogic.xml for weblogic8.1 like this:<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 7.0//EN" "http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd"> <weblogic-web-app> <description>WebLogic Descriptor</description> <jsp-descriptor> <jsp-param> <param-name>debug</param-name> <param-value>true</param-value> </jsp-param> </jsp-descriptor> </weblogic-web-app>Could you show me another weblogic.xml file for weblogic9.2 like this?thx
August 27, 2007 at 7:29 am #274592
Loyal WaterMemberCould you show me another weblogic.xml file for weblogic9.2 like this?
You can add this to Weblogic 9 as well
<weblogic-web-app> <description>WebLogic Descriptor</description> <jsp-descriptor> <jsp-param> <param-name>debug</param-name> <param-value>true</param-value> </jsp-param> </jsp-descriptor> </weblogic-web-app> -
AuthorPosts
