• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Script for testing

 
rahul karwal
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anyone pls tell me why is Java Script preffered for validation of JSP's?
Thanking you
aziz d
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP just generates an HTTP response. You need to validate the response. HTTPUnit is a good unit testing framework to do just that. I'm not sure I'd go as far as saying that JavaScript is preferred, but definitely some client-side unit testing framework is necessary to validate that your JSP files are generating the correct output.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34667
366
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aziz,
Do you mean testing the jsp or testing what the user entered on the jsp? If you are testing the jsp itself, I agree that HttpUnit is good.
If you are testing user input, javascript is good because it doesn't require a server roundtrip. It gives the user immediate feedback. It is good to have server side testing too in case someone turns over javascript.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic