|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Verifying User Information question
I'm wondering what people's opinions are on this one:
Is it safe to assign user input to bean file variables, and THEN check the information (i.e. for invalid characters), or is it better practice to check the input directly from the request object (request.getParameter("var1")) and only then assign it to bean file variables? Dan |
|
#2
|
|||
|
|||
|
I prefer to do assignment validation in the setter method of the variable (in the bean). This makes the bean more independent of the environment it is used in.
|
|
#3
|
||||
|
||||
|
i prefer bean less redundant programming. If you can make a bean with all types of verification your site uses ur set.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > Verifying User Information question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|