Solved

How <html:javascript> works in Struts 1.3?

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

757 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

23 Experts available now in Live!

Get 1:1 Help Now