This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 1.0 issue with ActionForm

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I have a jsp page which uses the html struts tag to write to a forum bean as below:



In my FormBean, I have the following defined:



But when I run my jsp page, I get the following exception:



I guess I have followed the Javabeans convention but why do I still get this error?

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has this got anything to do with the Struts / Tomcat version??? I'm using Struts 1.0 on Tomcat 6.0.32. Could this potentially be the source of this problem?
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a little more to do with Strut's ActionForm creation. You need to add configuration data about the ActionForm in a struts-config document, and if using the Validator framework, you need to add configuration data to the Validator configuration files as well..
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have added this form in my struts-config declaration.



and I have also configured the action mappings definition as well. But still this error seems to be persistent. Like I have mentioned in my post above, could it be because of the Struts and Tomcat versions?

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The same configuration works without any problems in WSAD application server. But just in Tomcat it seems to have some problems.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No getter method for property customerCode of bean org.apache.struts.taglib.html.BEAN


This is a standard error message indicating that you either have not created the ActionForm correctly, not created the JSP file correctly or have not entered the correct configuration data. It has nothing to do with web server versions or the Struts API.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic