File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bean:message passing dynamic arguments

 
Venkat Babu
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In my MessageResources.properties i have:

label.inst=From {0} to {1}

and in jsp
<bean:message key="label.inst" arg0="2007" arg1="2009"/>


This works fine.

But if I pass dynamic values in the arguments I am having problems

I tried
<%
String s1 = "2007";
String s2 = "2011":
%>
<bean:message key="label.inst" arg0="<%=s1%>" arg1="<%=s2%>"/>

Any help will be great.

Thanks.
 
Venkat Babu
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind. The jsp was complaining "Missing quotes for attribute value". But when I accessed the page it worked. I think there is some problem with my IDE.

Thanks.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic