permaculture playing cards
The moose likes Struts and the fly likes How can I validate my Data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How can I validate my Data" Watch "How can I validate my Data" New topic

How can I validate my Data

surendar prabu
Ranch Hand

Joined: Jul 24, 2006
Posts: 102
How Can I validate my <html:form> data from client side with out using Java Script, but by using some thing provided by struts.

can i use <script> tag in my struts congig.xml.

what is the difference between using this tag and wiring the java script function directly in JSP.

Surendar Prabu.

SCJP 1.4
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If you want client-siide validation, you will be using JavaScript. That's the only way it can be done. If you use the Struts Validation framework, the JavaScript is provided by the framework instead of you writing it.

can i use <script> tag in my struts congig.xml.

No, you can't.

The following links will give you more information about how to use client-side validation:
[ September 01, 2006: Message edited by: Merrill Higginson ]

Consultant, Sima Solutions
RoshaniG Gopal
Ranch Hand

Joined: May 15, 2006
Posts: 180
Hi Surendar Prabu.
You may use the Struts validation for the same. It may used by using Validator.xml along with validation-rules.xml.


Regards,<br />Roshani
I agree. Here's the link:
subject: How can I validate my Data
It's not a secret anymore!