You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Adam Hardy <ah...@cyberspaceroad.com> on 2003/10/17 14:24:42 UTC
Re: [newbie] JSTL using different ResourceBundles
On 10/17/2003 12:16 PM Christian Martin wrote:
>
> <code>
> <message-resources parameter="countries" />
> <message-resources parameter="states" />
> </code>
> .....in struts-config.xml
>
> then i want to print out messsages in the jsp.
>
> <code>
> <fmt:message bundle="${countries}" key="message.test">
> <fmt:message bundle="${states}" key="message.test">
> </code>
>
> what is the correct value for parameter bundle?
>
> but as i expected JSTL can't find the messages. ???message.test???
> appears in the browser.
The ${countries} and ${states} won't be available as variables to EL in
your JSP just because you have them set up in your struts-config.
If you do:
<c:out value="${countries}" />
what do you get?
Adam
--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: [newbie] JSTL using different ResourceBundles
Posted by Christian Martin <ch...@joanneum.at>.
nothing.
are they available in any scope (request, session ...), if i set up the
variables in struts-config?
i believe i can answer the question for my own. they are not available
in any scope, because the EL searches in every scope for the variable.
am i right?
where does <bean:message bundle="test" key="message.test" ... /> get the
bundle from?
by the way <bean:message .....> doesn't find the bundle either.
following error occurs:
<error>
javax.servlet.jsp.JspException: Cannot find message resources under key test
</error>
what am i doing wrong i have test.properties on my classpath
and
<code>
<message-resources parameter="test" />
</code>
in struts-config?
thanks in advance
------------------------------------------------------
student working on a struts projekt during internship
Adam Hardy wrote:
> On 10/17/2003 12:16 PM Christian Martin wrote:
>
>>
>> <code>
>> <message-resources parameter="countries" />
>> <message-resources parameter="states" />
>> </code>
>> .....in struts-config.xml
>>
>> then i want to print out messsages in the jsp.
>>
>> <code>
>> <fmt:message bundle="${countries}" key="message.test">
>> <fmt:message bundle="${states}" key="message.test">
>> </code>
>>
>> what is the correct value for parameter bundle?
>>
>> but as i expected JSTL can't find the messages. ???message.test???
>> appears in the browser.
>
>
> The ${countries} and ${states} won't be available as variables to EL
> in your JSP just because you have them set up in your struts-config.
>
> If you do:
>
> <c:out value="${countries}" />
>
> what do you get?
>
> Adam
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org