You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Jennings, Christofer J." <CJ...@Semprautilities.com> on 2002/06/20 16:55:03 UTC

with parametric replacement in Struts 1.0.2

Does parametric replacement work in Struts 1.0.2?

This code isn't working....

[ApplicationResources.properties]
note.range=We only go between (0) and (1).

[MyConstants.java]
public static final int FIRST = 10;
public static final int LAST  = 12;

[myPage.jsp]
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ page import="myApp.Constants" %>
<bean:message key="note.range" 
              arg0="<%= String.valueOf(Constants.FIRST) %>" 
              arg1="<%= String.valueOf(Constants.LAST) %>" />

... the result is "We only go between (0) and (1)."

Any clues?

Thanks,
boz

Re: with parametric replacement in Struts 1.0.2

Posted by Dave Derry <dd...@acm.org>.
----- Original Message ----- 
From: "Jennings, Christofer J." <CJ...@Semprautilities.com>
Subject: <bean:message> with parametric replacement in Struts 1.0.2


> Does parametric replacement work in Struts 1.0.2?
> 
> This code isn't working....
> 
> [ApplicationResources.properties]
> note.range=We only go between (0) and (1).
> 

try: note.range=We only go between {0} and {1}

Note the use of curly braces rather than parans

Dave Derry


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>