File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes What is the best way to test and debug servelets within Eclipse? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "What is the best way to test and debug servelets within Eclipse?" Watch "What is the best way to test and debug servelets within Eclipse?" New topic
Author

What is the best way to test and debug servelets within Eclipse?

Benjamin Weaver
Ranch Hand

Joined: Apr 08, 2003
Posts: 161
I have dimly heard of various tools for testing servlets in Eclipse but did not know which was best and exactly for what?

What, within Eclipse, enables testing of servlets?
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Moving this to the "IDEs, Version Control and other tools" forum as this is clearly an Eclipse related topic.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30356
    
150

Benjamin,
To test the servlet "for real", you need to deploy it to a server and test it. There are many Eclipse plugins for Tomcat - a free lightweight server. (Seach this forum for details.)

You also may be interested in writing automated tests. You can use JUnit to unit test the servlet passing it a mock request from easyMock/jMock. You can integration test the servlet on the server using Cactus or JWebUnit.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What is the best way to test and debug servelets within Eclipse?