You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Thai Dang Vu <TV...@dhmh.state.md.us> on 2005/08/10 23:06:28 UTC

Specify which resource bundle to use for tag in validation.xml?

Hello everybody,
 
I have many struts config files in my application. One of them is struts-config-provider.xml. In this file, I declare a resource file and validation files like this:
 
<message-resource key="provider" parameter="Provider"/>
<plug-in className="org.apache.struts.validator.ValidatorPlugin">
    <set-property property="pathnames"
                        value="/WEB-INF/provider/conf/validation.xml, /WEB-INF/provider/conf/validator-rules.xml"/>
</plug-in>
 
In my validation.xml file, I have several lines like <arg0 key="form1.name"/> What do I have to do to tell Struts to use form1.name in my resource bundle (Provider.properties)?
 
Thanks for any help.


Re: Specify which resource bundle to use for tag in validation.xml?

Posted by Laurie Harper <la...@holoweb.net>.
Thai Dang U wrote:
> I have many struts config files in my application. One of them is struts-config-provider.xml. In this file, I declare a resource file and validation files like this:
>  
> <message-resource key="provider" parameter="Provider"/>
> <plug-in className="org.apache.struts.validator.ValidatorPlugin">
>     <set-property property="pathnames"
>                         value="/WEB-INF/provider/conf/validation.xml, /WEB-INF/provider/conf/validator-rules.xml"/>
> </plug-in>
>  
> In my validation.xml file, I have several lines like <arg0 key="form1.name"/> What do I have to do to tell Struts to use form1.name in my resource bundle (Provider.properties)?
>  
> Thanks for any help.

Are you using modules? If so, and struts-config-provider.xml is configured 
correctly in web.xml (on the ActionServlet definition), you shouldn't need 
to do anything special. I'm not sure how it works if you're using multiple 
configuration files without modules, though.

L.
-- 
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie
Founder, Zotech Software: http://www.zotechsoftware.com/


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