Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-29-2007, 09:51 PM
Member
 
Join Date: Jul 2007
Posts: 72
Swamipsn is on a distinguished road
New to Struts
Hi,

I am new To Struts can any one explain to me What is validator and how to use it..? many thanks...?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-01-2007, 01:13 PM
Member
 
Join Date: Jul 2007
Posts: 9
arfatkhan is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 08-01-2007, 01:41 PM
Member
 
Join Date: Jul 2007
Posts: 72
Swamipsn is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 01-17-2008, 12:17 PM
Member
 
Join Date: Dec 2007
Posts: 28
anki1234 is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Struts 1 vs Struts 2 (III) JavaForums Java Blogs 0 01-16-2008 06:51 PM
Struts 1 vs Struts 2 (II) JavaForums Java Blogs 0 01-16-2008 06:51 PM
Struts 1 vs Struts 2 (I) JavaForums Java Blogs 0 01-16-2008 06:51 PM
Struts or JSF? Swamipsn Web Frameworks 0 08-01-2007 11:10 AM
Struts or JSF? Swamipsn New To Java 0 08-01-2007 06:35 AM


All times are GMT +3. The time now is 08:21 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org