You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Barbara Post <ba...@ifrance.com> on 2002/06/14 20:12:27 UTC
ApplicationConfig problem
I want to use a .properties files in my ActionForm to retrieve localized
messages when populating ActionError().
I get a NullPointerException here :
ActionServlet myAS = this.getServlet();
try{
ApplicationConfig applicationConf = new ApplicationConfig("",myAS);
String msgResourcesParameter =
applicationConf.findMessageResourcesConfig("baepp.ApplicationResources").get
Parameter();
>>>>>>>>>>>>> System.out.println(msgResourcesParameter);
// MessageResourcesFactory mf;
// mf = MessageResourcesFactory.createFactory();
// msgResources = mf.createResources(msgResourcesParameter);
//
System.out.println(msgResources.getMessage("user.company.missing"));
Struts-config.xml :
<message-resources
parameter="baepp.ApplicationResources"/>
indeed I have WEB-INF/Classes/baepp/ApplicationResources.properties
Using Struts 1.1b1 (release) and JDK 1.4.0. Tomcat 4.0.3 and 4.1.3 beta.
______________________________________________________________________________
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>