facebook

source not found debugging compiled _JSP.java file

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #224814 Reply

    jerryzhang
    Member

    I’m not doing JSR-45 sense of JSP debugging, I’m just trying to debug compiled xxx_jsp.java files. I mounted C:\jboss-3.2.3\server\default\work\MainEngine\localhost\_ in my project. After setting a breakpoint, execution paused, an editor opened, but instead of showing the content of the java file, it shows “Source not found for taskTimeline_jsp._jspService(HttpServletRequest, HttpServletResponse) line: 44”.

    Another problem is that since my JSP files are grouped in directories, such as task\taskTimelin.jsp, if I open taskTimeline_jsp.java in Eclipse, I got error “the declared package does not match the expected package” since the first line of the java file is “package org.apache.jsp;”, not “package org.apache.jsp.task;” How do I fix this?

    #224832 Reply

    Riyad Kalla
    Member

    jerry,
    This isn’t supported and I’ve never done it, but debugging will search all OPEN projects when trying to resolve a class, so you don’t necessarily need to have the files in your current project. With that said, try and create a new Java Project that has it’s source dir and output dir set to the project root, then set the project root to your work/MainEngin/localhost/_ dir, or whatever the base dir containing the “org” dir is. You might need to add the proper Tomcat libarries to the build path for the files to compile, but then try and see if debugging works.

    #224899 Reply

    jerryzhang
    Member

    i think the problem is that Tomcat compiled the _jsp.java to be in package “org.apache.jsp” even if the JSP file is under a subdirectory “Task”, but it placed the java and class files in directory “Task” under work/MainEngin/localhost/_, so Eclipse thinks it’s in package “org.apache.jsp.task”. Is there a way to get around this?

    #224900 Reply

    Riyad Kalla
    Member

    Why are you using the underscore dir? Why not use the actual work dir for your application:
    /work/MainEngine/localhost/<myapp>/org/apache/jsp/(your files should be here)

    I just checked my work dir for 3 apps I have locally and the work dir has all the java/class files for each JSP page… I think the underscore (_) dir is just a temp dir that Tomcat uses…

    #224901 Reply

    Riyad Kalla
    Member

    BTW, I’m pretty sure there was a user a few months ago that did something like this and got it working, so I think it *is* possible.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: source not found debugging compiled _JSP.java file

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