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

 
badri nath
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

javax.servlet.ServletException: Exception creating bean of class

By seeing the error you can understand my problem..
I have my jsp, form , action class created and even naming
is correct every where even including in the struts-config.xml.

The code syntax for creating form-bean and action mappings is also
correct in struts-config.xml...I am getting this error when trying to
access the jsp page.

I have googled out the issue but of no use, i have tried(atleast i think i have tried )all possible ways out.

Can any one suggest what are all the possible reasons which causes this error.

Thanks in advance
 
RoshaniG Gopal
Ranch Hand
Posts: 180
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
There IS some mapping error. Please recheck the mapping for the cases,etc. Here is a pointer.
http://www.geocities.com/Colosseum/Field/7217/SW/struts/errors.html
Regards,
Roshani
 
badri nath
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

There IS some mapping error. Please recheck the mapping for the cases,etc.

I have checked it out and the form action element i am giving in
JSP page has action tag in struts config.xml..So that is not the
problem.

Can any suggest all the possible ways..atleast some ways
 
Jan Groth
Ranch Hand
Posts: 456
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are you sure your bean extends ActionForm? are you sure it has all needed (requested) getter and setters?

uncomment / delete all jsp code but the html form element, see if that renders without problems.

happy debugging,
jan
 
badri nath
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
uncomment / delete all jsp code but the html form element

I am as of now using only one property i.e., username and have created
getters and setters for that..i even checked all spellings
 
RoshaniG Gopal
Ranch Hand
Posts: 180
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Posting your code would make your life easy.
Regards,
Roshani
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Roshani. Please post:

1-The Acion-form definition and action mapping from your struts-config.xml file

2-The relevant portions of your JSP, including the <html:form> tag and the <html:text> tag.

3-Your ActionForm class

Also, make sure this class is compiled and that the class file exists in the WEB-INF/classes directory.
 
badri nath
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Merill,

Also, make sure this class is compiled and that the class file exists in the WEB-INF/classes directory

Thanks for your suggestion, it is working fine now. I am building the application using ant tool,but the class file is going and sitting at
some other place. I should with path mentioned in build.xml. As of now
i manually copied and placed that file in directory structure suggested
by you and working fine now..

Thanks for all the help i receive from ranchers...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic