RE: unable to get to compiled jsp files in debugger

"Mike D'Ambrogia" <[email protected]> Fri, 14 May 2004 18:00:51 -0700
Newsgroups gmane.comp.java.jswat.user
Organization jamagination.com
Message-ID <000201c43a18$12ab7870$1e01a8c0@tportable>
Nathan,

I found the source of the Lexer parse error noted below when opening
jasper created files.  The majority of our .jsp files use the underscore
_ character in the file name.  When jasper compiles these files with '_'
in the name, it creates the file with a '_0005f' as a replacement for
the '_' in the filename.  So a file with the original name of
part_one.jsp will end up as part_0005fone_jsp.java and
part_0005fone_jsp.class.  

Back in Jswat, when I attach remote and then click on the classes tab
and drill down to org.apache.jsp.partA.partB and open
part_0005fone_jsp.java I get a parse error, "ERROR:
com.bluemarsh.jswat.parser.java.lexer.LexerException: [243,21] Unknown
token: '

The error dialog shows 2x and then the file displays in the source
window and behaves as described originally.  Files without an _ in the
original file name load up just fine.

Thanks abunch for making jswat available, my first time in a java
debugger.  Quite amazing

Mike

-----Original Message-----
From: Nathan Fiedler [mailto:[email protected]] 
Sent: Friday, May 14, 2004 4:46 PM
To: [email protected]
Cc: [email protected]
Subject: Re: [jswat-user] unable to get to compiled jsp files in
debugger


Another JSwat user found that he had to set the suppressSmap parameter
to 'on' in the conf/web.xml in order to debug JSPs (not sure if he meant
the generated servlets or not). Apparently Tomcat 5.0 changed the manner
in which source code is mapped -- I have not looked into this at all
(this is bug 865).

Try that and see if it helps.

The CPU usage is due to JSwat exhaustively checking every loaded class
for a match to the source file name in order to set the breakpoint. That
is brute force approach used when the parser has failed.

Otherwise, if this is still broken for you, I will have to look into it
sometime. At this point it will be a week or more before I have time.

n