Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Benjamin Weaver
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the "IDEs, Version Control and other tools" forum as this is clearly an Eclipse related topic.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34837
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic