File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception creating bean of class

 
Rukmini Nagalla
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 326
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic