User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Dec 2006
Posts: 54
Reputation: staneja is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
staneja's Avatar
staneja staneja is offline Offline
Junior Poster in Training

Servlets -:CLient side Validation

  #1  
Sep 12th, 2007
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2006
Posts: 1,510
Reputation: masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light 
Rep Power: 10
Solved Threads: 136
masijade's Avatar
masijade masijade is online now Online
Posting Virtuoso

Re: Servlets -:CLient side Validation

  #2  
Sep 12th, 2007
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.
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
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JSP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 3:08 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC