You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by alvin antony <al...@yahoo.com> on 2003/11/21 16:57:42 UTC
Message Resources and Struts Modules
Hi friends,
I write a modularised Struts Application, which has one default module and an another with prefix 'admin'.
I have defined a default message resource for the default module as given below,
##### struts-con fig.xml ######
<message-resources parameter="de.lmu.internet.fdb.struts.ApplicationResources" null="false" />
OK, it works fine. i use the resource with <bean:message key="-key-"./>
Now I am trying to add a new admin module and tried all the possible ways to make the following definition working,
#####struts-config-admin.xml####
<message-resources key="advisoryalttext" parameter="resources.advisoryAltText" null="true" />
<message-resources key="messageresourcesadmin" parameter="resources.messageResourcesAdmin" null="true" />
<message-resources key="constantsadmin" parameter="resources.constants" null="true" />
<!--<message-resources parameter="de.lmu.internet.fdb.struts.ApplicationResources" null="false" />-->
when I try this <bean:message bundle="messageresourcesadmin" key="admin.verwaltung.index.msg1"/>
gets an exception .... [ServletException in:/admin/verwaltung/index.jsp] Cannot find message resources under key messageresourcesadmin'
I couldn't figure what I got here wrong.
any help is very much appreciated.
Thanks in advance,
Alvin
Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download now.
Re: Message Resources and Struts Modules (Partially Solved)
Posted by Manish Singla <Ma...@Sun.COM>.
No, there is no bug.
You can access message resources of of default module and ( message
resources of other modules also if required).
alvin antony wrote:
> Hello,
>
> I just tried to copy all message resources definitions to the default struts-config.xml and now they are no message resource definitions on the submodule struts config, everything is working, but a little bit unhandy to define message resources for a sub module some where else . Is this a bug in the current version or does it has some reasons for being so. If some of you have a better insight, please share.
>
> Thanks,
> Alvin
>
> alvin antony <al...@yahoo.com> wrote:
>
> Hi friends,
>
> I write a modularised Struts Application, which has one default module and an another with prefix 'admin'.
>
> I have defined a default message resource for the default module as given below,
>
> ##### struts-con fig.xml ######
>
>
>
> OK, it works fine. i use the resource with
>
> Now I am trying to add a new admin module and tried all the possible ways to make the following definition working,
>
> #####struts-config-admin.xml####
>
>
>
>
>
>
>
> -->
>
> when I try this
>
> gets an exception .... [ServletException in:/admin/verwaltung/index.jsp] Cannot find message resources under key messageresourcesadmin'
>
> I couldn't figure what I got here wrong.
>
> any help is very much appreciated.
>
> Thanks in advance,
>
> Alvin
>
>
> Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download now.
> Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download now.
--
Thanks
Manish Singla
x73166
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Message Resources and Struts Modules (Partially Solved)
Posted by alvin antony <al...@yahoo.com>.
Hello,
I just tried to copy all message resources definitions to the default struts-config.xml and now they are no message resource definitions on the submodule struts config, everything is working, but a little bit unhandy to define message resources for a sub module some where else . Is this a bug in the current version or does it has some reasons for being so. If some of you have a better insight, please share.
Thanks,
Alvin
alvin antony <al...@yahoo.com> wrote:
Hi friends,
I write a modularised Struts Application, which has one default module and an another with prefix 'admin'.
I have defined a default message resource for the default module as given below,
##### struts-con fig.xml ######
OK, it works fine. i use the resource with
Now I am trying to add a new admin module and tried all the possible ways to make the following definition working,
#####struts-config-admin.xml####
-->
when I try this
gets an exception .... [ServletException in:/admin/verwaltung/index.jsp] Cannot find message resources under key messageresourcesadmin'
I couldn't figure what I got here wrong.
any help is very much appreciated.
Thanks in advance,
Alvin
Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download now.
Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download now.