You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Wendy Smoak <We...@asu.edu> on 2003/10/15 00:54:46 UTC

Bean:write to c:out conversion for something in .properties file

The struts-example webapp has the following in logon.jsp:
   <bean:message key="prompt.username"/>:

The message comes from ApplicationResources.properties.  The README file
for Struts-El says that <bean:write> is replaced by <c:out>.  How do I
write out something in the .properties file?

I looked at bean-write.jsp in the strutsel-exercise-taglib webapp, but
did not see an example of this.

I'm working with the 10/14 nightly build.  Has anyone done an EL version
of struts-example?  

I don't have i18n issues, I can just as well hard-code the labels, but I
thought I'd try to follow more best practices this time around.

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM 

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


Re: Bean:write to c:out conversion for something in .properties file

Posted by Kris Schneider <kr...@dotech.com>.
Put the following in web.xml:

<context-param>
   <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
   <param-value>ApplicationResources</param-value>
</context-param>

and then use:

<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>

<fmt:message key="prompt.username"/>

Wendy Smoak wrote:

> The struts-example webapp has the following in logon.jsp:
>    <bean:message key="prompt.username"/>:
> 
> The message comes from ApplicationResources.properties.  The README file
> for Struts-El says that <bean:write> is replaced by <c:out>.  How do I
> write out something in the .properties file?
> 
> I looked at bean-write.jsp in the strutsel-exercise-taglib webapp, but
> did not see an example of this.
> 
> I'm working with the 10/14 nightly build.  Has anyone done an EL version
> of struts-example?  
> 
> I don't have i18n issues, I can just as well hard-code the labels, but I
> thought I'd try to follow more best practices this time around.
> 

-- 
Kris Schneider <ma...@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