Hi Thomas, you can validate user input using either JSTL or a Bean..
You will have to call "<portlet:renderURL/>" when the form is submitted in either case, hence validation is done outside the portlet class.
But with more complex validation, such as verifying that a parameter holds an email address or a credit-card number,
or that a value matches a list of valid values held in a database, we can do a lot better with a
bean. Using a Bean:
Here is your jsp code:
Here is your bean class:
It would be preferable to use a bean because its cleaner, it encapsulates and separates validation code from the JSP.
I hope this helps.
Joined: Mar 23, 2007
Thanks for the input.
I can see that it is the Approach to use when validating a Form.