•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 456,488 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,733 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 1684 | Replies: 1 | Solved
![]() |
Hi i am making a new user page where user will fill username and password and i want to put some client side validation on it
Suppose user has given wrong values in password and Confirm password column so before a request is send to secnd servlet i want to restrict user with a validation message
I dont want to use Java script i wan to write some code in my Servlet1 only
Can you please tell me if it is possible
Suppose user has given wrong values in password and Confirm password column so before a request is send to secnd servlet i want to restrict user with a validation message
I dont want to use Java script i wan to write some code in my Servlet1 only
Can you please tell me if it is possible
Where does a servlet run? On the client or on the server. Once you answer that question you will know whether or not you can perform client side validation in a servlet.
Also, your application should never rely on any kind of operations on the client side. They may have the needed resources disabled, or they may be spoofing the results, whatever, you don't know. It should always, always, be checked again on the server side. You can have client side validation, but it should only be used for convenience (i.e. giving the user the opportunity to correct an entry before it is sent to the server), and should never be relied upon by the server.
Also, your application should never rely on any kind of operations on the client side. They may have the needed resources disabled, or they may be spoofing the results, whatever, you don't know. It should always, always, be checked again on the server side. You can have client side validation, but it should only be used for convenience (i.e. giving the user the opportunity to correct an entry before it is sent to the server), and should never be relied upon by the server.
Last edited by masijade : Sep 12th, 2007 at 5:05 am. Reason: typo
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Batch print barcode in ASP.NET, C#, on client side (ASP.NET)
- Help needed for client side sorting of data (ASP.NET)
- How do i print asp page on client side "only the contents" (ASP)
- What is server and client side code? (ASP.NET)
- ASP locating file at client side (Windows NT / 2000 / XP / 2003)
Other Threads in the JSP Forum
- Previous Thread: getting parameters from jsp...plz help
- Next Thread: WAR file contains DB or not



Linear Mode