• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Exception creating bean of class

 
Ranch Hand
Posts: 57
  • 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
 
Ranch Hand
Posts: 180
  • 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
  • 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
 
Ranch Hand
Posts: 456
  • 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
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Posting your code would make your life easy.
Regards,
Roshani
 
Ranch Hand
Posts: 4864
  • 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
  • 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...
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic