facebook

How to debug JSPs in MyEclipse using JBoss

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

    Steve Gutter
    Member

    I can’t get JSP debugging (from the .jsp file) to work.
    I’m using JBoss 3.

    The posts I’ve seen give me the impression that this will only work if using a server
    which supports the JSR045 debugging spec, which JBoss 3 (which uses Tomcat 4) does not.

    Question 1:
    If I use JBoss4 instead, which I believe uses Tomcat 5, will it then work?

    Question 2:
    If I stay with JBoss 3, how do I debug the .jsp: by pointing to the source in the JBoss3 directory which contains the compiled .jsp? Does anyone have some documentation which shows how to do this?

    #237019 Reply

    Scott Anderson
    Participant

    I’m using JBoss 3.

    JBoss 3 doesn’t have JSR-045 support which is required for debugging.

    Question 1:
    If I use JBoss4 instead, which I believe uses Tomcat 5, will it then work?

    Yes.

    Question 2:
    If I stay with JBoss 3, how do I debug the .jsp: by pointing to the source in the JBoss3 directory which contains the compiled .jsp? Does anyone have some documentation which shows how to do this?

    Sorry, there’s no documentation available for such a model because you can’t map between the JSP source lines and the Java source without JSR-045 support.

    #237087 Reply

    Steve Gutter
    Member

    I switched to JBoss4, but its still not working.

    It stops at the breakpoint correctly, and I can see the variables, but the ‘step over’ doesn’t work: the current line pointer stays at the breakpoint, and the thread chain shows it as Suspended.

    Question 1) I am using MyEclipse 3.8.3: should it work with that version of MyEclispe using JBoss4?

    Question 2) Is there some setting I have to have turned on, such as telling MyEclipse where to find the compiled JSP (which is in the JBoss4 directory structure)?

    #237095 Reply

    Riyad Kalla
    Member

    What does the line look like? If you have a lot of @include directives in your page, debugging can be quite confusing depending on the sourcemap from the server.

    #237122 Reply

    Steve Gutter
    Member

    Its working better, now, but not still not exactly as I expected.
    It looks like I should expect the ‘Suspended’: that just means its wating for me to continue with the stepping through.

    Question 1: For logic sets of tags, if I set a breakpoint at the logic:notEqual, it will stop at the logic tag, but if I ‘step over’, it goes to the ending tag. It doesn’t step through each tag within the logic group. But, if I set a breakpoint at the logic:notEqual tag and the TDs within the logic:notEqual set, it will stop at each line within the logic:notEqual set.
    Is there some setting I’m missing?

    Question 2: Does this get improved in MyEclipse 4.0? I’m using 3.8.3 now.

    Question 3: It doesn’t appear to care where the source is for the compiled JSP (in this case, its in JBoss4’s directory structure). Is there a way to put a breakpoint in the generated JSP code, and step through it like any other Java code?
    <logic:notEqual name=”listSize” value=”0″>

    Here’s the JSP code I’m referring to in Question 1.<TR>
    <TD align=”center”><B>Trailer</B></TD>
    <TD align=”center”><B>Total Weight</B></TD>
    </TR>

    <TR>
    <TD align=”center”> <bean:write name=”dispatchTrailersForm” property=”trailer” /></TD>
    <TD align=”center”> <bean:write name=”dispatchTrailersForm” property=”totalWeight” /></TD>
    </TR>

    </logic:notEqual>

    #237124 Reply

    Riyad Kalla
    Member

    1) Stepping with taglibs is quite tricky and can be inaccurate (as you have seen) we would encourage you to set breakpoints inside of your logic blocks instead of trying to stop at the tag and step from there. Keep in mind that the debugger is doing the best it can given the source map it receives from the app server. So for example if it gets back a source map that provides no line numbers for the taglibs OR provides big empty jumps in line numbers, then you will see irradic behavior.

    2) Some bugs were fixed and some functionality was improved, but the problems you are having now likely still will occur in 4.0 because the app server will still return the same source maps.

    3) This is not supported, although we had a few crazy folks actually import the generated code into their Eclipse project, and then just use the Java editor to set breakpoints in them. They said it worked, but as I mentioned, this is not supported so YMMV

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: How to debug JSPs in MyEclipse using JBoss

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