• 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

Struts 1: Problem using EL to reference form bean

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using struts 1.3.8 and JSTL 1.1

EL is working ok (I can access vars in all scopes).

I have a DynaValidatorActionForm in session scope which EL can see, but when I try to access a property using ${myForm.flowType} (flowType is a string declared in struts-config.xml) I get:

javax.servlet.jsp.el.ELException: Cannot find PropertyDescriptor for 'flowType' for bean 'class org.apache.struts.validator.DynaValidatorActionForm'

Thanks in advance
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Struts DynaActionForm uses a Map to store property names and values. The Struts bean:write tag knows this and allows for it, but JSTL tags are not aware of this. Therefore, when using JSTL, you must reference the map that holds the variables through a property called "map". Example:
 
What a show! What atmosphere! What fun! What a 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