This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 1.0 issue with ActionForm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 1.0 issue with ActionForm" Watch "Struts 1.0 issue with ActionForm" New topic
Author

Struts 1.0 issue with ActionForm

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

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?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

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

Joined: Apr 16, 2008
Posts: 2187
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

Joined: Sep 26, 2006
Posts: 9345
    
    2

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

Joined: Sep 26, 2006
Posts: 9345
    
    2

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

Joined: Apr 16, 2008
Posts: 2187
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 1.0 issue with ActionForm
 
Similar Threads
displaying data from arrays with html:text
javabean getter and setter
x,y coordinate of mouse click
taglib in JSP not working in struts
Cant find getter method on formbean