Try this <bean:define name="column" property="investmentPeriodType" id="investmentPeriodType" type="java.lang.String" /> <bean:message name="column" bundle="konditionsuebersicht.select.<%=investmentPeriodType %>" />
if this doesn't work try this <bean:define name="column" property="investmentPeriodType" id="investmentPeriodType" type="java.lang.String" /> <% String colName = "konditionsuebersicht.select." + String.valueOf(investmentPeriodType); request.setAttribute("colName",colName); %> <bean:message name="column" bundle="colName" /> Thanks Nazeer -----Original Message----- From: Zmitko, Jan [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 4:05 PM To: '[EMAIL PROTECTED]' Subject: dynamic selection of messages from properties file Hello, I try to show messages in the GUI depending on values from backend. The value which I receive are of the type int like 1, 2, 3.... Now I have to show the correctly message. The messages in my .properties File show as follows. Because of a better of readability I would´t write in the .properties File not only the number. konditionsuebersicht.select.2 = Tag konditionsuebersicht.select.3 = Woche konditionsuebersicht.select.4 = Monate konditionsuebersicht.select.5 = Jahre Now I try to use these message with the <bean:message> tag. I try different ways but no was successful. The last shot shows as follows: <bean:define name="column" property="investmentPeriodType" id="investmentPeriodType"/> <bean:message name="column" bundle="konditionsuebersicht.select.{$investmentPeriodType}" /> I get the error: javax.servlet.jsp.JspException: Property for message key must be a String Can anobody help me with my problem. Thanks Jan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]