File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Remote Scripting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Remote Scripting" Watch "Remote Scripting" New topic

Remote Scripting

Hari Haran

Joined: Aug 23, 2003
Posts: 10
I have a jsp page .On clicking a function key i dynamically generate a text box and enter a value in it.This i do it using javascript.Now i want to validate this entered value.The validation requires database access.And based on the validation result i have to perform some action.The validation logic is in a servlet. How can i make use of remote scripting for this purpose.? How can i access that validation logic by remote scripting ? Can anybody help me ?
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Basically you are going to have to repost the form and do your validation that way by doing the lookup in the database.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at
We require names to have at least two words: your first name, a space, then your last name. Fictitious names are not allowed. Please edit your profile and select a new name which meets the requirements.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Eric is right though, pick either server side or client side. You can't have it both ways.
Actually, you can, but then you end up with your application spread half way across the internet. If the database is required for validation, submit back to the server, validate on the server, send the response.
I agree. Here's the link:
subject: Remote Scripting
It's not a secret anymore!