Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse + maven + tomcat debugging

I'm developping a web application in Eclipse and I'm using maven, spring and tomcat. Now the problem I have is that debug as => debug on server doesn't work. I just get exceptions. (and yes I've created the server)

If I use the mvn command to compile it, put the war in my tomcat webapps dir and start my tomcat the application works fine. But for the functionallity I'm now working on debugging would be usefull.

like image 442
Tom Avatar asked Apr 16 '10 07:04

Tom


People also ask

How do I run debugging in Eclipse?

A Java program can be debugged simply by right clicking on the Java editor class file from Package explorer. Select Debug As → Java Application or use the shortcut Alt + Shift + D, J instead.


2 Answers

I found the answer for this in http://jacksonps4.me/wordpress/?p=868

Worked like a charm for me, yet I don't understand anything!

like image 154
user340202 Avatar answered Sep 20 '22 21:09

user340202


We used to test our application with Tomcat as well, but switched to starting an embeddable Jetty. Here's a sample app. It's JSF, but it doesn't really matter. The pseudo-unit test simply starts a jetty "before" and shuts stops it "after". No need for external server infrastructure, no need for IDE dependencies.

like image 29
lexicore Avatar answered Sep 22 '22 21:09

lexicore