facebook

JSP debugging, Tomcat 5.0.5 Alpha [Configuration]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #197439 Reply

    Im using Tomcat 5.0.5 Alpha and want to test the debug JSP feature. I can place a breakpoint within the JSP. When I call the page from a browser the web app is stopped somewhere (I don’t get a reply so the breakpoint is seen by the debugger). But when I go to Eclipse, to the debug perspective none of the tomcat threads is suspended, they are all running. Therefore I cann’t step through the jsp. I read at one onther post in the forum mentioning the same behaviour. No sollution was given. I this a bug or do I have to configure something. (I experienced this problem on several JDK’s)

    #197440 Reply

    support-michael
    Keymaster

    We’re working to isolate this problem. For example I just a built new test machine with Tomcat5.0.5alpha, JDK1.4.2, MyEclipse 2.5.1, on XP Pro. I created a simple test webapp with a single JSP with the following scriplet:

    <% Date d = new Date();
    out.println(“The time is ” + d);
    %>

    With a breakpoint set on the println statement. I fired up Tomcat, deployed, breakpoints were activated, and stopped when JSP page was activated.

    Q0: What OS are you using?

    Q1: I assume the breakpoints are not activated when Tomcat is running, i.e., activated breakpoint appears with checkmark when Tomcat JVM loads breakpoint. Can you confirm this?

    Q2: Are you deploying with MyEclipse deployer, ANT, or other mechanism? Is deployment exploded or WAR?

    Q3: Is there anything special about the JSP/Webapp your running?

    Q4: Is the server.xml or the context fragment file modified for the application you describe?

    We need more info to isolate this problem since it appears environmental in nature.

    Michael,
    MyEclipse Support

    #197443 Reply

    Q0: What OS are you using?
    NT4sp6a, Eclipse Version: 2.1.0 Build id: 200303272130, Sun JDK 131/Sun JDK 140/JRocket81_141_02

    Q1: Q1: I assume the breakpoints are not activated when Tomcat is running, i.e., activated breakpoint appears with checkmark when Tomcat JVM loads breakpoint. Can you confirm this?
    I am not quite sure what you mean but I think the answer is yes. What I did was set a breakpoint in the editor by dubble clicking at the left of the source, a circle was shown on the spot where the breakpoint was placed, I started the server, opened a browser windows and surfed to the url of the jsp. I never received an answer from Tomcat.

    Q3: Is there anything special about the JSP/Webapp your running?
    No, just following the tutorial!

    Q4: Is the server.xml or the context fragment file modified for the application you describe?
    I just followed the steps described in the tutorial.

    #197445 Reply

    support-michael
    Keymaster

    Another user experienced similar problems as you report. The problem was his environment (I suspect JDK but swore it wasn’t). He reinstalled his environment: JDK, Tomcat, Eclipse, and MyEclipse and the problem disappeared. I thought that was extreme but it worked for that user.

    1) Try using either JDK 1.4.1 or JDK 1.4.2, stick with GA version only, for launching Tomcat. The JSP debugger requires JSR045 support which is only available in a more recent JDK1.4 series release. Make sure that you set the Tomcat JDK preference page to use the recommended JDK 1.4.[1|2] verses relying on the default system JDK used for launching Eclipse.

    2) You can identify an activated breakpoint by inspecting its visual state once the class/JSP has been loaded. The breakpoint decorator (the blue ball) in left margin will include a checkmark when the breakpoint is activate in the executing JVM. If it does not have a checkmark during execution of the breakpoint-enabled code, then the thread will no suspend. Can you check this after running your test JSP using the recommended JVM?

    Michael
    MyEclipse Support

    #197519 Reply

    I can confirm that it runs OK on:

    OS: XP,
    Eclipse: 2.1.0 build 200303272130
    AS: Tomcat 5.0.6Alpha
    JDK: SUN 1.4.1_01

    #207047 Reply

    ydotcomdotbr
    Member

    Hello, I’m having problems with the JSP debugger too.
    The breakpoints doesn’t appear with the check, just the circle.
    My Environment:
    – OS Win2000 Server (is it ok?)
    – J2SDK 1.4.2_02
    – Eclipse 2.1.3
    – Tomcat 5.0.18

    It’s just a simple JSP. Breakpoints in classes called by the jsp stop the threads but the eclipse do not respond. Everything stops indefinitely.
    S.O.S. 🙂

    #207075 Reply

    Riyad Kalla
    Member

    ydotcomdotbr,
    What version of MyEclipse are you using? Are you starting your app server in debug mode? Are you getting any exceptions in your log file? (<workspace dir>\.metadata\.log is the log file)

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: JSP debugging, Tomcat 5.0.5 Alpha [Configuration]

You must be logged in to post in the forum log in