The validator pulls it from the request.

So, you need a custom impl of MessageResources. Then, you just configure your message resource factory in the struts-config and you are done.


-- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx

----- Original Message ----- From: "Christian Bjørnbak" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 11, 2004 3:17 AM
Subject: Using non struts-config.xml MessageResource in the Validator



Hi

I'm currently migrating a system from some homemade XML framework to Struts.

The system is an application service provider where lots of companies have the own db driven ResourceBundle for i18n.

All the companies use the same struts-config.xml as they all share the same Actions, Forms and jsps, and servlet's PathInfo decide which company's pages is requested..

The i18n for the texts on the pages is solved by extending the JSTL messageTag to use our own ResourceBundle.

Now the problem is the texts used at validation of errors...

I would like to be able to use the Struts Validator, but how do I tell the Validator to use a custom ResourceBundle/MessageResource instead of the one from struts-config.xml??

I've figured that extending the ValidatorPlugin is the entrence, but I can't find where the errors converted to texts..

Any pointers??

/Christian Bjørnbak

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to