facebook

Debugging JSPs in /WEB-INF/* [Reopened for Mike ;-)]

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

    myoungstrom
    Member

    Using Eclipse 3.0M4
    MyEclipse 3.6.3
    Windows XP
    JDK 1.4.2

    I cannont seem to be able to debug JSPs that are accessed from the /WEB-INF/* directory and referenced using struts actions.

    If the .jsp is located anywhere else it will debug fine using actions or direct access.

    Is this a limitation of the JSP debugging JSR or a bug in MyEclipse?

    Mike

    #199614 Reply

    Scott Anderson
    Participant

    Mike,

    I’m not sure specifically what you’re doing so I’ll hazard some guesses. First, you can’t access a top-level JSP located in the WEB-INF directory from the web. However, you can place JSP fragments there and include them like this:

    
    <%@ include file="./WEB-INF/TomcatInclude2.jspf" %>
    

    I’ll assume that’s what you’re doing. I just tested this case and while the JSP debugger won’t stop if you directly set a breakpoint in an included page, it will step through the code in the included page if you set the breakpoint before the include statement and then ‘Step Over’ it in the debugger. The reason the breakpoints in the include don’t work directly is that since JSP’s use an ‘inlining’ technique for fragments, rather than a ‘call’, setting a breakpoint in an included page really means you’re setting breakpoints in all pages that include the included page. Does that clear things up?

    –Scott
    MyEclipse Support

    #199620 Reply

    myoungstrom
    Member

    I don’t exactly understand what you’re saying but I think you’re on the right track. Let me better describe what I’m trying to do.

    In struts there is a common pattern used to help protect missuse of JSPs. You can read about it here:

    http://www.onjava.com/pub/a/onjava/2002/10/30/jakarta.html?page=3

    So in its simplest form I have an action entry in my struts-config.xml that looks like this:

    <action path=”/test” parameter=”/WEB-INF/jsps/test.jsp” type=”org.apache.struts.actions.ForwardAction” />

    When I deploy my webapp I can display /WEB-INF/jsps/test.jsp by using the URL /test.do

    So then, when I attempt to debug /test.do by placing a breakpoint in /WEB-INF/jsps/test.jsp the breakpoint is passed by.

    However, if I create an action entry like this:

    <action path=”/test” parameter=”/test.jsp” type=”org.apache.struts.actions.ForwardAction” />

    I can place a breakpoint in /test.jsp and have it take when I request /test.do

    So is my inability set breakpoints for jsps in the /WEB-INF directory a limitation of the jsp debugging JSR and therefore impossible or is this a bug in MyEclipse?

    I can provide a test .war if you require.

    Thanks,
    Mike

    #199621 Reply

    Scott Anderson
    Participant

    Mike,

    I’m not sure at this point. How about sending a zip of your project directory to support@genuitec.com and we’ll give it a look and see what we can do?

    –Scott
    MyEclipse Support

    #199774 Reply

    myoungstrom
    Member

    Scott,

    This is just a quick note to see if you got the project I emailed to you last week and if you’d had a chance to look into the problem yet?

    Mike

    #199782 Reply

    support-michael
    Keymaster

    Hi Mike,

    We received the sample app and its on my plate to research. I collaborate with Scott on these type of issues. Expect some feedback shortly.

    Michael
    MyEclipse Support

    #200203 Reply

    myoungstrom
    Member

    Michael,

    Sorry to keep bugging you about this but I figured it was about time to send out another reminder to checkout this problem. I know you’re busy I just want to make sure this doesn’t fall through the cracks. 🙂

    Thanks,
    Mike

    #201171 Reply

    myoungstrom
    Member

    Just checking in again to see if anyone in support has had the opportunity to look into this problem yet.

    Thanks,
    Mike

    #201185 Reply

    Scott Anderson
    Participant

    Mike,

    I spoke with one of the developers and he *thinks* it’s fixed. However, I have not personally retested it. I’ll probably have some time later today and I’ll look into it then.

    –Scott
    MyEclipse Support

    #201213 Reply

    Scott Anderson
    Participant

    I tried this out by adding a welcome file that was in the WEB-INF directory and setting a breakpoint on it like this:

    
      <welcome-file-list>
        <welcome-file>/WEB-INF/jsps/MyJsp.jsp</welcome-file>
      </welcome-file-list>
    

    It worked as expected for me, stopping at the breakpoint when invoked.

    –Scott
    MyEclipse Support

    #201220 Reply

    myoungstrom
    Member

    Thanks for looking into this for me. I’ll try it out when 3.7 is released.

    Thanks,
    Mike

    #201859 Reply

    myoungstrom
    Member

    I just tried it with 3.7 and I am experiencing the same problem. Instead of testing using the “welcome-file-list” try the test case I emailed to you around the end of October beginning of November.

    Mike

    #201951 Reply

    myoungstrom
    Member

    Hmm…..so how do I open this issue back up?

    I must say that on a whole MyEclipse’s support has been great. However, for whatever reason I have had a bugger of a time getting help of any kind for this issue.

    Am I doing something wrong? Is support unable to duplicate the issue? Do I need to further clarify the issue? I’m feeling kind of ignored. 🙂

    Mike

    #201955 Reply

    Scott Anderson
    Participant

    Mike,

    Please don’t feel ignored. I’ll be glad to reopen the issue. The problem is that we’ve been unable to duplicate it internally. Perhaps there is something that is different about your project setup that we’re not replicating. For example, I know there is currently an open bug regarding research into debugging problems for files whose names contain underscores. It might be something like that, or something else that is causing us to experience different results than you are. Can you create a very simple project that replicates the issue for us to test with?

    #201957 Reply

    myoungstrom
    Member

    I created a test case project and sent it to you around the end of October or beginning of November earlier to duplicate the issue. Do you still have it? Or do you want me to send it again?

    Mike

Viewing 15 posts - 1 through 15 (of 18 total)
Reply To: Debugging JSPs in /WEB-INF/* [Reopened for Mike ;-)]

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