File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes bean:message passing dynamic arguments Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean:message passing dynamic arguments" Watch "bean:message passing dynamic arguments" New topic
Author

bean:message passing dynamic arguments

Venkat Babu
Ranch Hand

Joined: Jan 12, 2007
Posts: 47
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

Joined: Jan 12, 2007
Posts: 47
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: bean:message passing dynamic arguments