my dog learned polymorphism
The moose likes Struts and the fly likes Exception creating bean of class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Exception creating bean of class" Watch "Exception creating bean of class" New topic

Exception creating bean of class

lynn fann
Ranch Hand

Joined: Oct 15, 2006
Posts: 115
hi all, i having the above error. can someone tell me what i should do?

<form-bean name="contentForm"

<action path="/ContentAction"
<forward name="success" path="/list.jsp"/>

public class ContentForm extends ActionForm{

private String title;
private String content;
private String name;
private String file;

public ContentForm() {
public String getTitle() {
return title;
public void setTitle(String title) {
this.title = title;
public String getContent() {
return content;
public void setContent(String content) {
this.content = content;
public String getName() {
return name;
public void setName(String name) { = name;
public String getFile() {
return file;
public void setFile(String file) {
this.file = file;

anything that is wrong?

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
about ninety percent of the time, this exception happens because of a spelling error, and this appears to be no exception.

For your form bean you define the package as com.strutsExample.formbean for your action class you define the package as com.strutsexample.action. I suspect that due to this inconsistency, the package name for your form bean is spelled wrong, or at least has the wrong case. Shouldn't it be com.strutsexample.formbean ? (with lower case "e")

Consultant, Sima Solutions
lynn fann
Ranch Hand

Joined: Oct 15, 2006
Posts: 115
alright thanks, i overlooked that.
I agree. Here's the link:
subject: Exception creating bean of class
It's not a secret anymore!