You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Chan, Jim" <jc...@incognito.com> on 2004/03/18 19:34:51 UTC

Can validation.xml be modularized?

I have modularized my Struts application using different struts-config.xml
files. Also I am using different resource properties files for localization
for each module.  Everything works fine.  Currently, I am hooking up the
client side validation using the struts validation plugin.  However, the
only way I can get it working is to register all the form validation in the
validation.xml, and access the localized error messages using the default
resource properties file.

Does anyone know how to:

1.  modularize the validation.xml so that I can decompose it the same way as
I did for the struts-config files.  I tried using xml includes, but the
validation plugin complains that it can't find my validation1.xml file.  It
only works if I use the absolute file path.

<!DOCTYPE project [
  <!ENTITY validation1 SYSTEM "./validation1.xml">
]>

&validation1;

2.  when registering the forms in the validation.xml, access different
resources properties which I specify in the struts-config files 

Any help will be appreciated.

Re: Can validation.xml be modularized?

Posted by Matt Bathje <mp...@ntsource.com>.
----- Original Message ----- 
From: "Chan, Jim" <jc...@incognito.com>
To: <st...@jakarta.apache.org>
Sent: Thursday, March 18, 2004 12:34 PM
Subject: Can validation.xml be modularized?


>
> I have modularized my Struts application using different struts-config.xml
> files. Also I am using different resource properties files for
localization
> for each module.  Everything works fine.  Currently, I am hooking up the
> client side validation using the struts validation plugin.  However, the
> only way I can get it working is to register all the form validation in
the
> validation.xml, and access the localized error messages using the default
> resource properties file.
>
> Does anyone know how to:
>
> 1.  modularize the validation.xml so that I can decompose it the same way
as
> I did for the struts-config files.  I tried using xml includes, but the
> validation plugin complains that it can't find my validation1.xml file.
It
> only works if I use the absolute file path.
>
> <!DOCTYPE project [
>   <!ENTITY validation1 SYSTEM "./validation1.xml">
> ]>
>
> &validation1;
>


For this part - I have wrestled with this alot, and have not been able to
get it to work for validation.xml or tiles-defs.xml. Search back through the
archives for something like "entity includes" and you will see my problems
with it, and some suggestions for fixing - none of which have worked for me.

I myself am convinced there is a bug in the plugin processor, or in
validation and tiles themselves that make this not possible. It works fine
in struts-config though. When I get free time (yeah right) I plan on getting
to the bottom of this, but I have know idea when it would be.


Matt Bathje


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org