Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Debuging Eclipse Java Project as External Web Application - debug view not in sync with code  RSS feed

Dominic Owen
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EDIT: Nevermind - I figured out the problem! It was a project specific problem involving needing to rerun an ant file before deploying Tomcat.

Hi all,

I know the setup sounds crazy, but given the project's structure, this was the only way I could get it to deploy within Eclipse.

The project itself is a large open source application ( that was not specifically designed to run in Eclipse. However, after a bit of a struggle I have managed to get the project up and running in eclipse debug mode.

The setup is as follows: The project has three java source folders, and a large number of other directories at the same level. One of these folders is "web", in which three connected web applications sit. So the contexts are web\geonetwork, web\intermap and web\geoserver. For a very detailed description of my setup you can look at this setup document I created for other purposes:

Because of this interdependent setup, I do not know how to create each context as a "Dynamic Web Project" in eclipse - so instead I link to each context as an "external web module" within my Eclipse Tomcat Server. This works fine - my applications run great from Tomcat and I can debug through the code seemingly well too.

The problem occurs when I make changes to the code - when I debug after changing the code, the debugger shows my new code, but is out of sync and is clearly running off of the old class files (stopping at where break points used to be, taking on old values, etc.). I've tried various combination of project refreshes, project cleaning and restarting eclipse, but none seem to work.

I suspect this syncing problem occurs because when I initially debugged, I received the message: Source not Found - with an "Edit lookup Path" option. When I did so, I added my java project, and then the source was found. However, my unconventional web app setup combined with the syncing problems makes me think I should have done this individual step differently. I know there is a lot going on behind the scenes with my code between eclipse and tomcat, and I think that may be where the problem lies...but so far, I am stumped!

I know this is quite the unique problem - but any feedback would be greatly welcomed!


EDIT (a somewhat shorter synopsis): I have a Java project in eclipse that contains three web application contexts. To get them to run in Tomcat in Eclipse, I linked to them as external Web Modules. When I run them in Tomcat and debug, the Tomcat debugger shows the newest version of my Java source code, but runs old class files (i.e. my web application does not receive code changes). I can not get them to sync, even with server restarts, project cleans and eclipse restarts.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!