Category Archives: eclipse

Great Git plugin tutorial for Eclipse

This is a link to remember for usage of EGit in Eclipse:

Eclipse display worskspace location

Recently, whilst using eclipse I needed to switch to different workspace so that I could use a different branch of the code I had been working. In order to eliminate confusion as to which code I was working on:

  • I created a new workspace for this branch under File/ Switch Workspace
  • Amended the eclipse startup to include the “-showlocation” switch

So now I have two workspaces and the location of the workspace is displayed in the title bar so I don’t get confused as to which branch I am working on.

Maven Webapps debug with Eclipse and Tomcat

I like using Maven. I also like using Step-Trace-Debugging. So here is what I do to accomplish this using Tomcat, Maven and Eclipse.



  • Create or Import your maven project into Eclipse
  • Select File > Properties for this project
  • Select the Tomcat property
  • Check the box “Is a Tomcat Project”
  • Enter the context name. For my example, dcmdb
  • Click Apply
  • Go to /conf/Catalina/localhost and edit the context file i.e. dcmdb.xml.
    • Edit the docBase and workDir to point to the location of your maven project
    • Notice that the docbase should point to ../dcmdb/target/dcmdb-1.0 where
      • ../dcmdb = the location of my maven project
      • ../target/ = the directory that is created when using the maven package command
      • ../dcmdcb-1.0 = the directory that is my artifact name. It’s the webapp
  • The final step involves changing the Java Build Path property in Eclipse by pointing the source output to /target/dcmdb-1.0/WEB-INF/classes. This means that once you make a change to your code all you need to do is restart tomcat.