facebook

Debugging Tomcat

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

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

    david_pollak
    Member

    Howdy,

    I am running MyEclipseIDE 3.8.4, Eclipse 3.1M6, Tomcat 5.5.4, and JDK 1.5.

    When I set a breakpoint in my JSP pages, I get an error message:

    “Source not found for index.jsp line: 5”

    What magic do I have to do to get JSP debugging working?

    Thanks,

    David

    #229577

    Scott Anderson
    Participant

    David,

    First you need to check Tomcat’s server.xml file and ensure that JSP debug support is turned on. After that, I’ll ask you to review our Web Project Quickstart, in our Documentation section here http://www.myeclipseide.com/images/tutorials/quickstarts/webprojects/, which will walk you through a test project and debug session to get you started.

    #229685

    jashaffner
    Member

    What does the line in server.xml looks like for turning on/off the support for jsp debugging? There is not even a word of “jsp” in my tomcat’s server.xml.

    Thanks.

    #229703

    Scott Anderson
    Participant

    Sorry, it’s the sever’s web.xml file. Look for org.apache.jasper.servlet.JspServlet

    Also, please try debugging a very small “example” project as we set up in the tutorials which will tell us if it’s installation or project related.

    #229705

    jashaffner
    Member

    I am not an expert with Tomcat inside out. Is it “classdebuginfo” parameter to be set to “true” for org.apache.jasper.servlet.JspServlet?

    #229721

    Scott Anderson
    Participant

    yes, classdebuginfo and development should both be true. suppressSmap should be false. However, these are the defaults, so unless they’re to be the opposite you should be ok. Did you try my suggestion with the simple example project as shown in the tutorials?

    #230316

    david_pollak
    Member

    So, how do I get myeclipseide to copy the non-class files (e.g., properties, etc.) from the WEB-INF/classes directory to the corresponding deployment directory?

    #230317

    Scott Anderson
    Participant

    David,

    Everything in the classes directory is copied as part of deployment. Please note, however, that the Eclipse java builder will delete everything in your output directory (WEB-INF/classes) when it builds the project. For your non-class artifacts to be properly copied into WEB-INF/classes, simply place them in the appropriate spot in the Java source directory for the web project. When the Java builder encounteres non-Java resources, it simply copies them to the output location.

    #230343

    david_pollak
    Member

    That’s not what is happening. The deployment does *not* copy the complete contents of the classes directory, only the actual class files.

    #230347

    Riyad Kalla
    Member

    david,
    Please switch to your navigator view, refresh your project and drill down to your classes dir (output dir), find a file that is not a class file. Now open the deployment tool, select your deployment and hit “Browse”, and drill down into the WEB-INF/classes dir to the same location where that file should be… is it there?

    If not, please check your <Workspace dir>\.metadata\.log file for exceptions, let’s see if we can figure out why they aren’t getting deployed.

    Also, does this webproject have a proper webroot, or are you using the project root as the webroot?

    #230372

    david_pollak
    Member

    I do not have a “navigator” view. I’ve got a Java perspective and a package explorer in the Java perspective. Is the “navigator” view in another perspective?

    From the command line, I’m able to cd into <my project>/WEB-INF/classes and see the various files I’m looking for. They are copied from the <my project>/WEB-INF/src directory by a custom ANT builder script that I wrote.

    There are no build errors in .log. The last error is from 2 days ago relating to opening Mozilla and nothing relating to copying files.

    The project root is the web root. So, my index.jsp file is in the top level directory of the project.

    #230376

    Riyad Kalla
    Member

    Is the “navigator” view in another perspective?

    Window > Show View > Navigator

    They are copied from the <my project>/WEB-INF/src directory by a custom ANT builder script that I wrote.

    AHHHHH, this is the problem, you need to refresh your project after running the Ant script. If you are updating the output directory outside of the Eclipse process it won’t see your changes and by association MyEclipse will not deploy them. You need to refresh so all the files are resynced with the workbench.

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: Debugging Tomcat

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