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/17 10:47:42 UTC
Help needed with ApplicationConfig
Hi,
I don't understand what to do to make it work. My ActionForm wants to
retrieve a MessageResources, but the direct method is deprecated in Struts
1.1.
So I do the following:
ActionServlet myAS = this.getServlet();
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"));
I get a NullPointer here :
applicationConf.findMessageResourcesConfig("baepp.ApplicationResources").get
Parameter();
Anyway I cannot verify that applicationConf is ok.
in my struts-config.xml :
<message-resources
parameter="baepp.ApplicationResources"/>
and the ApplicationResources file does exist in WEB-INF/classes/baepp.
Please help, since the documentation for struts 1.1 is scarce, or did I miss
it ? and I have read the Javadoc 1000 times :-(
BP
______________________________________________________________________________
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>