Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

getting error with bean:message tag

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using <bean:message> tag, but it is not accepting any dynamic value for arg.

<bean:message bundle="product.loader" key="gfasload.already1" arg0="<bean:write name ='loadInvestmentForm' property='code'> </bean:write>"/>

If i write out side <bean:write name ='loadInvestmentForm' property='code'> </bean:write> the its giving me value, but inside <bean:message/> not giving.

thanks in advance.
 
Kumar Sushil
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any body help me on this?
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I`m too not able to find out solution for it ..

like many time I want to display the results in input field ,
so in struts I ended up writing something like this ,



but this wont compile , So I need to write something like as classic html



this complies and works fine ..

May be If you are loading this page after action executes , we can save the message with the key and display on jsp page with <html:messges/> tag .

Does that help ?
 
Kumar Sushil
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply.
Actually I want use <bean:message> and as you are aware that for using <html:message> we required to write code in action classes also, that is not with <bean:message>.
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where are you creating this bean , loadInvestmentForm ?
Set this bean in request attribute and then use
runtime expression or JSTL tags like <jsp:useBean > or {loadInvestmentForm.code} in arg0=" " ..

Try this,
 
Kumar Sushil
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I try outside arg0 <bean:write> tag, it is working fine. I think in <bean:message> with args some problem. We can pass only hard code value or we required with run time expression. With JSTL also. nothing happend
 
My cellmate was this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic