Results 1 to 5 of 5
Thread: New to Struts
- 07-29-2007, 08:51 PM #1
Member
- Join Date
- Jul 2007
- Posts
- 74
- Rep Power
- 0
- 08-01-2007, 12:13 PM #2
Member
- Join Date
- Jul 2007
- Posts
- 9
- Rep Power
- 0
Hi,
In struts validator framwork. This used for client side validation.
There are 2 important files
Validation.xml and Validator-rules.xml
In Validator-rules.xml all Validation rules will be available.
In validaor.xml you need to mention the form name for which you are validating and field name and some other information.
- 08-01-2007, 12:41 PM #3
Member
- Join Date
- Jul 2007
- Posts
- 74
- Rep Power
- 0
Tanks...But I am able to use validator but if the validation found false e.g Name field is set as "required" how can I print a error message from Action class to a JSP page
- 01-17-2008, 11:17 AM #4
Member
- Join Date
- Dec 2007
- Posts
- 28
- Rep Power
- 0
Put the messaege error{0}is required in ur Application properties ( Copy from the validator-rules.xml)
and then retrieve formbean object=field value in the same Application properties file
it wl work
- 10-07-2008, 11:01 PM #5
Member
- Join Date
- Oct 2008
- Location
- US
- Posts
- 58
- Rep Power
- 0
For others benefit, here is a link which has struts validation example
Strtus 2 Validation Example
____________________________________________
Software Wiki | Interview FAQs | Lucene Search | Oracle | ORM | Struts2 | Job SeekerHave fun....
JAVA FAQs
Similar Threads
-
Struts or JSF?
By Swamipsn in forum Web FrameworksReplies: 0Last Post: 08-01-2007, 10:10 AM -
Struts or JSF?
By Swamipsn in forum New To JavaReplies: 0Last Post: 08-01-2007, 05:35 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks