• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to set the <bean:message key="abc.xyz" /> into jsp:setProperty parameter

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 " .
 
What I don't understand is how they changed the earth's orbit to fit the metric calendar. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic