| Author |
how to set the <bean:message key="abc.xyz" /> into jsp:setProperty parameter
|
Polishetty Raghavendra
Greenhorn
Joined: Apr 09, 2006
Posts: 18
|
|
Hi,
I am trying to set the value of a bean property using jsp:setProperty.
This below code i am hardcoding the value as resourceABC into resourceId property of mybean. This working fine.
<jsp:useBean id="mybean" class="com.abc.xyz">
<jsp:setProperty name="mybean" property="resourceId" value="resourceABC" />
</jsp:useBean>
But when try to read the value from a property file using the struts-bean tags, and i want to set that particular value into resourceId property of mybean.
This is code :
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<jsp:useBean id="mybean" class="com.abc.xyz">
<jsp:setProperty name="mybean" property="resourceId" value=" <bean:message key="abc.xyz"/> " />
</jsp:useBean>
I am getting the error as " Attribute abc.xyz is unrecognised for jsp element jsp:setProperty " .
|
Regards,<br />P Raghavendra<br />SCJP 1.5 - 70%
|
 |
 |
|
|
subject: how to set the <bean:message key="abc.xyz" /> into jsp:setProperty parameter
|
|
|