- This topic has 9 replies, 2 voices, and was last updated 18 years, 4 months ago by Riyad Kalla.
-
AuthorPosts
-
dbakerwesMemberHello!
I have just started to test MyEclipse 5.0. Our current development environment is Eclipse 3.1, so having JSP debugging would be very valuable. (I already like the JSP editor in MyEclipse!)
I’ve taken an existing project and converted it into a MyEclipse Web Project. I did this by making a new web project, copying over my source files and refactoring accordingly. The application works fine, and this is using Tomcat 5.0 launched from MyEclipse. I see that when I deploy the application, it updates the JSP files accordingly.
My problem is that I can’t seem to get the execution to stop on a given breakpoint within a JSP. (breakpoints within the servlet’s code itself work w/o trouble!)
Is it required that I direct my browser directly to the JSP? Meaning, the normal entry for my application is http://localhost:8080/myprogram/App which in turn does some initialization and then redirects to a JSP page.
Is this why the breakpoints are getting missed, and is there a workaround? I’m somewhat of a newbie (new to the job, taking over existing code) so please forgive any ignorance!
Doug
Riyad KallaMemberDoug,
You don’t need to point at the JSP directly, as long as it’s getting ‘excercised’ your break points should be hit.Make sure you are doing the following:
1) Running MyEclipse and Tomcat with atleast a JDK 1.4 or later, preferably the same JDK and something stable/new like 1.5.0_08 version of the JDK.
2) Make sure you are using all the latest stable releases of Eclipse 3.2 and MyEclipse 5.0.1. Also for tomcat using Tomcat 5.5 may be a good idea
3) Lastly, make sure your MyEclipse Tomcat connector is setup to launch Tomcat in debug mode, not Run mode.If you have done all of that and none of it has helped, try shutting down Tomcat, removing your deployment, cleaning/rebuilding your project, then going to your debug perspective, selecting the Breakpoints view, right clicking and selecting Remove All, then restarting MyEclipse using the -clean command line argument. Then recreate your project deployment, set a break point and run it, did it work?
dbakerwesMemberHi Riyad,
The effects seem to be a bit random, as sometimes it will work and sometimes it will not. I’m wondering if it’s at all linked to the “double breakpoints” problem I’d been posting about in the other thread, and if I had somehow only enabled the non-working breakpoint. There does not seem to be a re-creatable pattern even if I clean or re-deploy.
In any case, it’s working at the moment (meaning it’s stopping at the breakpoint!) but I’m getting a “Source not found for myjsp_jsp._jspInit()”
I have set up the JSP under the WebRoot of my project. (so it looks something like:
/workspace/myproject/WebRoot/myjsp.jspWhereas the deployment is in C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\myproject – and is getting updated when I redeploy.
Is there something amiss in my configuration?
I am on MyEclipse 5.0.0, not 5.0.1 just yet, and Eclipse 3.2 is a new install, JDK 1.4.2, Tomcat 5.0.25.
Thanks for your help!
DougThanks
Riyad KallaMemberDoug, your setup all looks good, but try Tomcat 5.5 for me really quickly. The source not found issue could be from a crappy source map back from the app server.
dbakerwesMemberHi Riyad,
I will see if I can try 5.5 – though the environment for which I’m developing is 5.0.25 – so for the time being I’d have to stick to that. Is there any way to trace what path Eclipse is trying to find?
Thanks!
Doug
Riyad KallaMemberThe purpose of 5.5 is just to test where the problem lies so we can continue trouble shooting, I’m not suggesting you move over (just yet) 😉
dbakerwesMember@support-rkalla wrote:
The purpose of 5.5 is just to test where the problem lies so we can continue trouble shooting, I’m not suggesting you move over (just yet) 😉
Fair enough. 🙂 Well I installed Tomcat 5.5.17 and JDK 1.5.06 (it seemed as though Tomcat 5.5 wants a Java 5 jdk) and indeed debugging worked. Ack! So am I out of luck with 5.0?
Thanks again for your help!
Doug
Riyad KallaMemberWell not yet, but I do remember seeing something about source maps in the change logs for 5.5. What you can try and do is run Tomcat 5.0 with JDK 5 and see if debugging works.
Also you might try dedownloading Tomcat 5.0 again, unzipping it to a new dir, all default settings and launching it and seeing if it works. You might have unknowingly changed a config file in your 5.0 install a long time ago that turns off the debug flags in the JSP generated servlets or something… a bit of a long shot, but worth a try.
dbakerwesMemberWell Riyad, I think you just earned a sale!
I only have one question. Do I have to pay more money for being dumb? 🙄 I tried reconfiguring Tomcat 5.0 to point to JDK 1.5.06, and sure enough it worked! I then went back to the JDK I originally configured Tomcat 5.0 to – it was 1.31!!!!! UGH!
Anyway I’ve reconfigured it to 1.42.08 and it’s fine. To check my sanity I removed Tomcat 5.5 & the extraneous JDKs. All is still well.
Thanks very much for your help and patience!
Doug
Riyad KallaMemberDoug I’m glad to hear it’s working now, thank you for sticking in there and trying all these things along the way. It’s always the little things that hang us up, happens to me all the time.
-
AuthorPosts