I will introduce JSF calidators and converters in this post.
Converters are plug-in for conversions.
<h:input_text valueref="testingBean.today" convertor="DateTime/">
Validators are used to perform correctness checks on UIInput values.
<h:input_text valueref="testingBean.today<br"> </h:input_text>
Creating JSF page is simple and easy. There are few things to remember which I will list down.
The page must include JSF tag library and HTML and core tags.
All the JSF tags must enclosed between a set of view tag.
Use JSF form and form component tags.
Use h:input_text and not input type=text
Use h:command_button and not input type=submit
A page may include validators and event listeners on any form components
Updated 11-02-2011 at 06:19 PM by Java Tip
You might have seen the following exception: Java Code: java.lang.NoClassDefFoundError: org/apache/log4j/*
It may mean that log4j is not in your class path or you are using some outdated version of log4j.
Get latest copy of log4j and put it in your class path. If JSP caused this, then put the log4j jar into WEB-INF/lib directory. Restart your application server (say Tomcat) and it should work now.
Get latest version of log4j from: Apache log4j 1.2 - Download Apache log4j 1.2