You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Viral_Thakkar <Vi...@infosys.com> on 2004/07/01 10:50:20 UTC

RE: Multiple Application Resources...???

Thanks Susan for the reference ...
 
In my jsp, I am using <html:errors /> tag to display all error messages.
 
Now I have moved the ApplicationResources to struts-config.xml file for
having multiple ApplicationResources.properties files as below,
 
<message-resources key="app1" parameter="ApplicationResources1"/>
<message-resources key="app2" parameter="ApplicationResources2"/>
 
Now its giving below error message,
 
500 Internal Server Error
javax.servlet.jsp.JspException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
at
org.apache.struts.util.RequestUtils.retrieveMessageResources(RequestUtil
s.java:1103)
      at
org.apache.struts.util.RequestUtils.present(RequestUtils.java:1408)
 
 
Should I provide any key to <html:errors /> tag.
 
Regards,
Viral
 
 
-----Original Message-----
From: Susan Bradeen [mailto:SusanB@softlanding.com] 
Sent: Wednesday, June 30, 2004 5:37 PM
To: Struts Users Mailing List
Subject: Re: Multiple Application Resources...???
 
"Viral_Thakkar" <Vi...@infosys.com> wrote on 06/30/2004 07:23:00

AM:
 
> Hi all,
> 
> As of now I have a following entry in web.xml for an 
> ApplicationResources.properties file.
> 
> <init-param>
>       <param-name>application</param-name>
>       <param-value>ApplicationResources</param-value>
> </init-param>
> 
> I have tried the one approach as mentioned below but it didn't work..
> 
> <init-param>
>       <param-name>application</param-name>
> 
> <param-value>ApplicationResources1,ApplicationResources2</param-value>
> </init-param>
> 
> Is there any other approach for this...?
> 
 
This link might help ... 
http://www.systemmobile.com/articles/strutsMessageResources.html
 
Susan Bradeen
 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
 
 
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
 
 

Re: Multiple Application Resources...???

Posted by Fulco <fo...@foux.net>.
Depending where your error messages are located (in 
ApplicationResources1 or ApplicationResources2), you should specify the 
"bundle" to use:

<html:errors bundle="app1/>
or
<html:errors bundle="app2"/>

Omitting the bundle will result (by default) of looking for the 
<message-resources ... > defined without the key="" attribute. The 
bundle attribute must be the same as one of your key attribute in the 
<message-resources.. > declarations.

cheers,
Fulco


Viral_Thakkar wrote:

>Thanks Susan for the reference ...
> 
>In my jsp, I am using <html:errors /> tag to display all error messages.
> 
>Now I have moved the ApplicationResources to struts-config.xml file for
>having multiple ApplicationResources.properties files as below,
> 
><message-resources key="app1" parameter="ApplicationResources1"/>
><message-resources key="app2" parameter="ApplicationResources2"/>
> 
>Now its giving below error message,
> 
>500 Internal Server Error
>javax.servlet.jsp.JspException: Cannot find message resources under key
>org.apache.struts.action.MESSAGE
>at
>org.apache.struts.util.RequestUtils.retrieveMessageResources(RequestUtil
>s.java:1103)
>      at
>org.apache.struts.util.RequestUtils.present(RequestUtils.java:1408)
> 
> 
>Should I provide any key to <html:errors /> tag.
> 
>Regards,
>Viral
> 
> 
>-----Original Message-----
>From: Susan Bradeen [mailto:SusanB@softlanding.com] 
>Sent: Wednesday, June 30, 2004 5:37 PM
>To: Struts Users Mailing List
>Subject: Re: Multiple Application Resources...???
> 
>"Viral_Thakkar" <Vi...@infosys.com> wrote on 06/30/2004 07:23:00
>
>AM:
> 
>  
>
>>Hi all,
>>
>>As of now I have a following entry in web.xml for an 
>>ApplicationResources.properties file.
>>
>><init-param>
>>      <param-name>application</param-name>
>>      <param-value>ApplicationResources</param-value>
>></init-param>
>>
>>I have tried the one approach as mentioned below but it didn't work..
>>
>><init-param>
>>      <param-name>application</param-name>
>>
>><param-value>ApplicationResources1,ApplicationResources2</param-value>
>></init-param>
>>
>>Is there any other approach for this...?
>>
>>    
>>
> 
>This link might help ... 
>http://www.systemmobile.com/articles/strutsMessageResources.html
> 
>Susan Bradeen
> 
>  
>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>    
>>
> 
> 
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
> 
> 
>
>  
>


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