• 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

A bug in Struts 1.0

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm supporting a project which uses Struts 1.0. It seems to have a bug lying in the functionality of data type conversion. I got 'No getter method for property modelYear'. My jsp code:

<bean efine id="modelYearCde" name="pFireRlvrForm" property="modelYear" type="java.lang.Integer"/>
<bean efine id="vinCde" name="pFireRlvrForm" property="vin" type="java.lang.String"/>
<bean efine id="confirmationCde" name="pFireRlvrForm" property="confirmation" type="java.lang.String"/>
modelYear is a field in the action form with int type. Here Struts is supposed to convert it automatically into Integer type. Obviously it failed.

I know that if I wrap modelYear field with a String type, I could resolve this issue. But I wonder if I need to do that for every non-String type fields? For example, do I need to change this one too?

<td class="text_centered"><bean:write name="record" property="modelYear"/></td>
<td class="text_centered"><bean:write name="record" property="cpcrModelCode"/></td>

I believe I'm not the first one to have this issue. Can anyone provide some more information about this bug?

Thanks!
Jenny
 
reply
    Bookmark Topic Watch Topic
  • New Topic