Hi everybody!

I have been using DynaValidatorForm to create every form in my application and I am actually validating all the forms using struts validations. at the head of every jsp I just add the following line:
XML Code:
<html:javascript formName="FormName"/>
So This way Struts validation create all the fuctions definen on the validations-rules.xml for every form mapped on the file validations.XML

Everything is working just fine with this, It save me a lot of time and It works just ok :)

BUT ............... :eek:
Now Im having some issues, becuase It is taking a lot of time to load every JSP becuase Struts validator is inserting a lot of java functions to validate my form, wich is Ok because I want to validate my form.

But what I just noticed was that, for every form It is duplicating the same code or some of the same functions.
So for example if a field needs to be in a range between 2 numbers, It creates a function to validate this part, and It creates that for every form that need the same rule.

I was wondering if there is a way that all the common fuctions can be generated in just one place (in a jsp or js ) so I can just importe that file on every JSP
I think this will solve a lot of the time needed to load every form.

Please if you can help me I will appreciate that.


have a great coding time :)