This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How can I validate my Data" Watch "How can I validate my Data" New topic
Author

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.

regards,
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:

http://struts.apache.org/1.2.9/userGuide/dev_validator.html
http://www.roseindia.net/struts/struts_validator_framework.shtml
[ September 01, 2006: Message edited by: Merrill Higginson ]

Merrill
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,
Roshani.


Regards,<br />Roshani
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I validate my Data
 
Similar Threads
html:javascript question
How to replace a if(boolean) script with struts tag?
Struts validation framework- for single form, multiple actions
how to validate file path?
portlet displaying commons vaidator errors