> > > My project uses servlet-api.jar. When debugging, I wanted to step
> > > into its classes (such as HttpServlet) but I got "Source code not
[quoted text clipped - 15 lines]
>
> - Show quoted text -
> > > > My project uses servlet-api.jar. When debugging, I wanted to step
> > > > into its classes (such as HttpServlet) but I got "Source code not
[quoted text clipped - 22 lines]
> -cheers,
> Manish
OK, but where do I get the correct source code, and what do I do with
it?
Manish Pandit - 21 Aug 2007 21:19 GMT
> > > > > My project uses servlet-api.jar. When debugging, I wanted to step
> > > > > into its classes (such as HttpServlet) but I got "Source code not
[quoted text clipped - 27 lines]
>
> - Show quoted text -
Not sure about Websphere - I doubt its code is available.
If it were Tomcat, you can just download the source and attach the
source path in eclipse.
-cheers,
Manish
Daniel Pitts - 22 Aug 2007 21:52 GMT
> > > > > My project uses servlet-api.jar. When debugging, I wanted to step
> > > > > into its classes (such as HttpServlet) but I got "Source code not
[quoted text clipped - 25 lines]
> OK, but where do I get the correct source code, and what do I do with
> it?
The real question is, are you sure you need to go into it? Perhaps
there is a way for you to debug your program without knowing the
containers source-code.
Larry - 23 Aug 2007 19:08 GMT
> > > > > > My project uses servlet-api.jar. When debugging, I wanted to step
> > > > > > into its classes (such as HttpServlet) but I got "Source code not
[quoted text clipped - 29 lines]
> there is a way for you to debug your program without knowing the
> containers source-code.
FYI... what I ended up doing is downloading the Java Decompiler (JAD)
and running
jad -sjava -lnc -nonlb HttpServlet.class
The "lnc" switch puts the line numbers from the original source as
comments in the output source code. However, the debugger doesn't
know anything about these comments (or at least I don't know how to
get it to take advantage of that), so I ended up writing a Perl script
to rewrite the output from JAD to actually put each line on the same
physical line number that it was in the original source (by putting in
the right amount of blank lines), and that worked in the debugger.
(A cleaner method would be to go into the class file and renumber the
source lines, but I don't know enough about the format of the class
file to do that)