Struts validation using validation, I have two questions: online waiting for an answer, thank you!

Category: Java Related
 
xuszdt
2013-08-18 12:40:20

Sponsored Links
Struts validation using validation, I have two questions: online waiting for an answer, thank you! Jiya!

1: Can validation.xml split into multiple xml configuration files? How to do?
If you can split, how to enjoy each xml CPC global variables?

Problem Background: As a project that requires authentication FORM very much, but in a FROM attribute may also have 20 or more. Hundreds FROM defined in a xml is a terrible thing, management, operations are unimaginable chaos. If this is to design a project's technical architecture, it is obviously wrong. My idea is that a definition of a FROM xml, it is best to share global variables.

2: In a Struts WEB application, you can only define a default properties file (Resources), but can have multiple properties files, Struts through each attribute KEY files accessible to distinguish the properties defined in that file. I also put attribute classification, the common property in the default properties file, and then press the corresponding a basic entity into a number of attributes used to distinguish KEY file. So clear, clear, for the simultaneous development team, it becomes simple and convenient. Such modify one property file, will not affect other properties file. Administrative, maintenance has become a simple matter.

However, I verified using the validation component, found in validation.xml can only access the default properties file attributes, for non-default properties file attributes not recognized.

I want to be able to absorb the Struts validation, validation mechanism should be synchronized with Struts, and may be used in ways I did not find , experts who know please tell me, Jiya! ! Thank

Sponsored Links

dantian1986
2013-08-18 12:46:30
Thank you! But the problem seems not to solve it! !
focus of the question:
1: How many customization validation.xml shared global data?
2: In each customized validation.xml how to use the non-default properties file KEY?

Problem Background: I asked this question before, has skipped put a system into several subsystems, each subsystem is divided into relatively independent of the WEB module! Struts supports multiple application modules, and there must be only one default application module!
my problem is that each sub-application module, there are still a number of FROM and should be further refined!

My question is:
1: How many customization validation.xml shared global data?
2: In each customized validation.xml how to use the non-default properties file KEY?
Asin09
2013-08-18 12:53:20
Thank you! But the problem seems not to solve it! !
focus of the question:
1: How many customization validation.xml shared global data?
2: In each customized validation.xml how to use the non-default properties file KEY?

Problem Background: I asked this question before, has skipped put a system into several subsystems, each subsystem is divided into relatively independent of the WEB module! Struts supports multiple application modules, and there must be only one default application module!
my problem is that each sub-application module, there are still a number of FROM and should be further refined!

My question is:
1: How many customization validation.xml shared global data?
2: In each customized validation.xml how to use the non-default properties file KEY?
Domain and server ip had changed since 8/23/2013. Suspend the user registration and posts for program maintenance.