facebook

Compiled JSP Source in debugger [Closed]

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

    Milind Rao
    Member

    This has definitely been asked and answered, but after going through the previous answers, I’m just as confused.

    I created a Web Project and deployed it using MyEclipse as an exploded archive to Tomcat.

    I’d like to view and set break points in the compiled JSP. What I’m getting when I step through the stack is the JSP source which is of no use. How can I see the compiled JSP source in the debugger and set a break point in the service method?

    Setup
    ——–
    Windows 2000 Professional Build 2195
    Eclipse 3.0, Build id: 200406251208
    MyEclipse 3.8 Beta 2, ver 3.7.200
    Tomcat 5.0.24

    #211655 Reply

    Riyad Kalla
    Member

    When you set a breakpoint in the JSP page and step through it, it will step through the JSP page, not the generated servlet that Tomcat creates… is this what you were asking?

    #211677 Reply

    Milind Rao
    Member

    Yes. That’s what I wanted to know.

    In the JSP, if I have called a tag and I have a breakpoint in the tag code, I can see the servlet in the call stack in the debugger, but the source is not displayed. Is there any way for me to display the source code so I can then set a breakpoint in the service method? Thanks.

    #211678 Reply

    Riyad Kalla
    Member

    Milind,
    IIRC trying what I’m going to suggest might make debugging kind screwy, so back out the change if it doesn’t work… what you can try is to add the base directory of the generated JSP-servlets under the Tomcat\work directory to your project as a source folder, that way when the debugger does step into the servlet (generated code) it can find the source and display it for you.

    Let me know if that works.

    #211679 Reply

    Milind Rao
    Member

    That does work, but it creates a whole bunch of errors like
    “The method _jspx_meth_html_base_0(HtmlTag, pageContext) is undefined for the type AlertDef_jsp

    #211690 Reply

    Riyad Kalla
    Member

    I’m glad it helped for debugging, but as you found out this isn’t a supported setup so its a “use at your own risk” or in this case “use at your own annoyance” situation.

    #211695 Reply

    Milind Rao
    Member

    Actually, it doesn’t help in the debugging. I can see the source (with the errors) and set a breakpoint, but it doesn’t stop at the breakpoint. I’d have thought that this would be very high on everyone’s wish list. No one gets NullPointerExceptions? This is the first time I’m doing web development with Eclipse. The last time I did web development, VAJ was still around. That had superb JSP debugging. Not only could you set BPs in the compiled JSPs, you could actually step line by line seeing the html page being generated.

    #211697 Reply

    Riyad Kalla
    Member

    Oh, sorry I thought it worked.

    I will check on the state of this, but honestly we’ve never had a request for it except for 1 gentleman that did this while trying to get JSP debugging to work on accident.

    #211713 Reply

    Riyad Kalla
    Member

    Milind,
    I checked with the team and we aren’t going to officially support this type of debugging, and actually don’t know of a IDE that does.

    #211755 Reply

    Milind Rao
    Member

    If I’m not mistaken, WSAD does that. I’ll have to see if the web tooling just released by IBM will allow me to do this.

    #211756 Reply

    Riyad Kalla
    Member

    Ahh, I haven’t used WSAD before.

    Also I didn’t want to give the impression that we would never support this, if user demand is high enough, we’ll do what we can to meet those needs.

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Compiled JSP Source in debugger [Closed]

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