The moose likes Servlets and the fly likes check for javascript load Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "check for javascript load" Watch "check for javascript load" New topic

check for javascript load

John Campbell

Joined: Aug 12, 2004
Posts: 4
Inside the servlet I would like to check if the request has been gone through javascript validation or not. The reason I need this is because the request might be intercepted by hackers between the web browsers and the web server and javascript could be disabled. Is there a way to check in servlet if javascript validation is loaded?
Scott Dunbar
Ranch Hand

Joined: Sep 23, 2004
Posts: 245
I would say no, there is no way to trust the client side 100%. All of your source code, both HTML and Javascript is available on the client side. As such, you cannot be sure of the integrity of the data.

The result is that you should never trust the client. Always verify all data in an environment that you control.

<a href="" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
John Campbell

Joined: Aug 12, 2004
Posts: 4
Thanks for the suggestion.
I agree. Here's the link:
subject: check for javascript load
It's not a secret anymore!