aspose file tools
The moose likes Struts and the fly likes Struts Validation Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Struts Validation" Watch "Struts Validation" New topic
Author

Struts Validation

Luke Zechariah
Ranch Hand

Joined: Sep 27, 2005
Posts: 106
Hello,

On struts validation, is it true that for server-side validation we must extend our actionform with DynaValidatorActionForm or DynaValidatorForm only. Can we also do it with ValidatorForm?

I am new to struts can anyone post a step by step procedure on how to perform validation on server side- if possible with code. Thank you very much in advance.

Lk.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26173
    
  66

Luke,
Welcome to JavaRanch!

We're pleased to have you here with us in the JStruts forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Please add a last name.

Thanks,
Jeanne
Bartender
[ October 27, 2005: Message edited by: Jeanne Boyarsky ]

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Luke Zechariah
Ranch Hand

Joined: Sep 27, 2005
Posts: 106
Thanks Jeanne for letting me know the rules. But does any body know the answer for the question I posted?

Thanks,
Lk.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4725

If you're only considering the Validation Framework (the framework where validations are defined in an xml file), you can use ValidatorActionForm and ValidatorForm.

If you're not using the Validator Framework you can still easily code your validations and extend any ActionForm class you want.


A good workman is known by his tools.
Luke Zechariah
Ranch Hand

Joined: Sep 27, 2005
Posts: 106
Thanks Mark for the reply. But can you please let me know of how to disable the client side validation and enable the server side validation. Can you tell me what changes should I make in the code. This is the code I have:














Thank you very much for your time.

Lk.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4725

In the JSP -
Take out the html:javascript tag and take out the onsubmit attribute from the html:form tag.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Struts Validation
 
Similar Threads
Validation in Spring
struts validation
How to use only Server Side Validation
Client side validation using Spring MVC
client side validation vs server side validation