File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Script for testing

 
rahul karwal
Ranch Hand
Posts: 73
  • 0
  • 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
  • 0
  • 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: 33696
316
Eclipse IDE Java VI Editor
  • 0
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic