MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
pbaker01
Post subject: WebLogic JSP debugging jspf includes [Closed]  PostPosted: Aug 06, 2005 - 06:53 PM
Veteran Member
Veteran Member


Joined: Aug 23, 2004
Posts: 41

I'm unable to debug JSPs with nested fragment files.

Environment: Eclipse 3.1 and MyEclipse from EnterpriseWorkbenchInstaller_4.0M2_E3.1.exe
Server: Weblogic 8.1

I�m able to set a breakpoint and debug a simple JSP. When this JSP is run the debugger is invoked at the specified breakpoint:
Code:

<%@ 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 'debug.jsp' starting page</title>
  </head>
 
  <body>
<%
 String test = "test";
%>
My test string is: <%= test %> <br>
  </body>
</html>

So, I know that everything is set up ok. But our production JSPs are VERY complex and may include many nested file fragments.

For example: JSP a.jsp may include fragments:
Code:
<%@ include file="b.jspf" %>
<%@ include file="c.jspf" %>
<%@ include file="d.jspf" %>

Each JSP fragment may then include many more fragments:
For example JSP fragment: b.jspf may include fragments:
Code:
<%@ include file="e.jspf" %>
<%@ include file="f.jspf" %>
<%@ include file="g.jspf" %>

And so on.

Because there are so many files and the files are very large I have turned off automatic JSP validation. When I manually validate one of our JSPs by right clicking and selecting Validate JSP I get the message: �The JSP File is Valid�. The editor does flag problems via the red bar in the right hand vertical column. See picture:

Image

The "annotations" listed are incorrect. For example the first line states:
Code:
-CityData cannot be resolved to a type (in file: �inc_processfindbooking.jspf�). 

A search for CityData in inc_processfindbooking.jspf returns zero occurrences.

CityData IS refereced in one of the inc_processfindbooking.jspf include files:
Code:
<%@ include file="../utils/city/inc_cityejb.jspf" %>

And inc_cityejb.jspf does contain the following:
Code:
<%@ page import = "com.xxxxxx.yyyyy.zzzzzz.city.param.CityData" %>

Would these annotation problems prevent the debugging?
What am I missing?
The JSPs can be successfully deployed with no problems.
My first thought is that the nested includes are causing problems.

I beleive the classpath is set up correctly as CityData code completion works fine in the fragment file: ../utils/city/inc_cityejb.jspf

See picture:
Image

Another annotation problem identified is:
Code:
INC_SECURITYREDIRECT_BKG cannot be resolved (in file: �inc_processfindbooking.jspf�)

INC_SECURITYREDIRECT_BKG is referenced in inc_processfindbooking.jspf and defined in include fragment file: inc_securityredirect.jspf. The import does seem to be after the usage, but this JSP works fine when deployed.
See picture:
Image

I am actively promoting MyEclipse within our organization but will not be able to get any interest until this is resolved.

Thanks in advance.

Paul
 
 View user's profile Send private message  
Reply with quote Back to top
pbaker01
Post subject: Follow up  PostPosted: Aug 07, 2005 - 04:55 PM
Veteran Member
Veteran Member


Joined: Aug 23, 2004
Posts: 41

The problem with the annotations seems to be caused because I had not included a class folder in build path. So, the annotation problem is not an issue.

The real issue is setting breakpoints in jspf files OR after jspf includes. If I place the breakpoint in the main jsp file and before any includes then the breakpoints work :) . If I place the breakpoint after the jspf includes or in a jspf file then the breakpoints do not work :( .

I have read some other thread that address the problem. But there were not solutions...

Is this still a problem? If not, then what am I missing...
If so, when will debugging work with jspf fragments (as advertised)?

MyEclipse quote:
Quote:
Supports breakpoints in both JSP files and included fragments
 
 View user's profile Send private message  
Reply with quote Back to top
support-scott
Post subject:   PostPosted: Aug 08, 2005 - 10:31 PM
Moderator
Moderator


Joined: May 06, 2003
Posts: 6761

Quote:

The real issue is setting breakpoints in jspf files OR after jspf includes. If I place the breakpoint in the main jsp file and before any includes then the breakpoints work :) . If I place the breakpoint after the jspf includes or in a jspf file then the breakpoints do not work :( .

Placing a breakpoing directly in a jspf is a problem. Here's the issue. A jspf might be included in 1000 differnt files in 1000 different ways. What does setting a breakpoint in it really mean then? It means setting 1000 breakpoints in the files that include the jspf because jspf files aren't called externally, they're litterally placed "inline" and replicated in each file they're used in. Right now, we don't run down every usage of the jspf to know precisely where to set all the breakpoints in all the files that include it. However, we do allow you to debug by going *into* them, via stepping. So, you can set the breakpoint on a java line above the jspf include you want to debug and then select Step Into in the debugger to walk through the jspf. In the case where a java snippet is not close to the include, the workaround is simply to add one, temporarily, set the breakpoint on it, then step into the jspf you want to debug. A little circuitous I know, but it is effective.

_________________
--Scott
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
pbaker01
Post subject:   PostPosted: Aug 08, 2005 - 11:10 PM
Veteran Member
Veteran Member


Joined: Aug 23, 2004
Posts: 41

Scott, thank-you for your reply.

I had tried what you suggested but there seems to be a problem with the line numbering. I placed a java snippet at the beginning of the JSP and then started stepping.. Everything works fine until the first fragment is included. Then the JSP lines shown in the debugger are completely wrong. The lines shown are JSP lines and it should be a JSPF fragment lines.

My problem is echoed here:
http://www.myeclipseide.com/modules.php?op=modload&name=PNphpBB2&file=viewtopic&t=7393

It the line problem still an open issue.

We use Weblogic 8.1.

Paul
 
 View user's profile Send private message  
Reply with quote Back to top
support-scott
Post subject:   PostPosted: Aug 08, 2005 - 11:55 PM
Moderator
Moderator


Joined: May 06, 2003
Posts: 6761

Paul,

The problem is with WebLogic 8.1 - it doesn't really support JSR-045 for "real" source level JSP debugging. We have something that works with what they have, but it can't take into account included files since the information just isn't available. Good news though - our debugger *will* work with WLS 9 since it really *does* support JSR-045. You'll need the upcoming release of MyEclipse 4.0M3 with the WLS 9 connector to get that working, if it's an option for you.

_________________
--Scott
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
pbaker01
Post subject:   PostPosted: Aug 09, 2005 - 12:32 AM
Veteran Member
Veteran Member


Joined: Aug 23, 2004
Posts: 41

Ok, I understand. Thanks! Paul
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits