struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject Re: <fmt:message
Date Thu, 10 Jul 2003 19:51:19 GMT
<fmt:bundle basename="path.to.my.stuff.MessagesMyBundle">
  <fmt:message key="my.message.to.display"/>
</fmt:bundle>

Quoting Ben Anderson <stuts_andersonbd1@hotmail.com>:

> As per earlier requests, I attempted to switch my <bean:message tags to 
> <fmt:message tags, however I have been unsuccessful thus far.
> 
> This is what worked:
> keys are defined in MessagesMyBundle.properties
> 
> <code file="struts-config.xml">
>   ....
>       <message-resources key="MESSAGE_MY_BUNDLE"
>                        parameter="path.to.my.stuff.MessagesMyBundle"/>
>   ....
> </code>
> <code file="myJsp.jsp">
>   ....
>     <bean:message key="my.message.to.display" bundle="MESSAGE_MY_BUNDLE"/>
> </code>
> 
> 
> I changed to this and I can't seem to get it working
> <code file="myJsp.jsp">
>   ....
>     <fmt:setBundle baseName="MESSAGE_MY_BUNDLE" var="myBundle"/>
>     <fmt:message key="my.message.to.display bundle="${myBundle}"/>
> </code>
> 
> the page renders but instead of displaying the message, it displays
> "???my.message.to.display???"
> 
> did I put too much code in here?
> Thanks,
> Ben

-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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


Mime
View raw message