Solved

How <html:javascript> works in Struts 1.3?

Posted on 2014-02-16
3
474 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
GUI builder for Eclipse? 8 35
servlet doXXX methods 3 49
netstat -ano | find "8000" and taskkill /f /pid 2984 3 57
maven module vs maven project 3 23
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

777 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