aspose file tools*
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
JavaRanch » Java Forums » Java » JSP
Bookmark "Remote Scripting" Watch "Remote Scripting" New topic
Author

Remote Scripting

Hari Haran
Greenhorn

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
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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
Rancher

Joined: Mar 06, 2001
Posts: 13459

"Hari",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp.
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.
Thanks.
Dave
David O'Meara
Rancher

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.
Dave.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Remote Scripting