Solved

How <html:javascript> works in Struts 1.3?

Posted on 2014-02-16
3
469 Views
Last Modified: 2014-03-12
Hi,

I am new to struts, while i am referring in some of the website, i got a doubt in the concept of enabling client level validations using struts validator framework. We are having all the  validations in the validator-rules.xml, And required validations for the form fields in validation.xml, (So all are in server side only).

According to the website information which i referred, validation will perform only at client side by using <html:javascript> tag, So our data will be validated at client level itself, so there is no communication required.

Here my doubt is, if there is no communication is required to server, then how the client will know for what validations has to perform for which fields, because all these info in validation.xml(server side only).

At lease one time communication is required right?

Please clarify...
0
Comment
Question by:prabhualla
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 39862935
I don't do Struts so can only offer a general 'theoretical' angle:

I would guess, since Struts is Java, they don't actually auto-generate a JavaScript form validator, though i could be wrong. It's reasonably simple to do so. The script would just look at the names and types of the form elements dynamically
0
 

Author Closing Comment

by:prabhualla
ID: 39924055
Thanks
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39924886
:)
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now