jQuery in Action, 2nd edition*
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
Author

Exception creating bean of class

Rukmini Nagalla
Greenhorn

Joined: Apr 29, 2005
Posts: 11
I am using tomcat 5.5. When I run a jsp page. I get an error saying:

javax.servlet.ServletException: Exception creating bean of class /WEB-INF/classes/LoginForm: {1}
Here is my struts-config.xml file:

<struts-config>

<form-beans>
<!-- Login form bean -->
<form-bean name="LoginBean" type="/WEB-INF/classes/LoginForm"/>
<form-bean name="RegistrationBean" type="/WEB-INF/classes/RegistrationForm" />
</form-beans>
<!-- ************************************************ -->
<global-forwards>
<forward name="register" path="/Registration.jsp"/>
</global-forwards>
<!-- *********************************************** -->
<action-mappings>
<action path="/registration" type="/WEB-INF/classes/RegistrationAction" name="RegistrationBean" validate="false" scope="request" />
<action path="/login" type="/WEB-INF/classes/LoginAction" name="LoginBean" validate="false" scope="request">
<forward name="success" path="/mainpatient.jsp" />
</action>
</action-mappings>
<!-- *********************************************** -->
<message-resources parameter="ApplicationResources" null="false" />

</struts-config>

Here is how I am calling action class in login.jsp:
<ht:form method="post" action="/login" focus="userName" >
Ray Stojonic
Ranch Hand

Joined: Aug 08, 2003
Posts: 326
the action type attribute should be the fully qualified class name (ie: java.lang.String) not it's location in your webapp structure.

in fact, that goes for all type attributes in your struts-config
Aman Verma
Greenhorn

Joined: May 10, 2005
Posts: 15
u should write the form bean entry as,
<form-bean name="LoginBean" type="LoginForm"/> instead of
<form-bean name="LoginBean" type="/WEB-INF/classes/LoginForm"/>

Regards,
Aman
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception creating bean of class