• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need Help in running a struts applicaton

 
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all

I am trying to run a sample application called miniHR.
Its give in the book Struts Complete Reference.
But when i try to run the application, using the URL

http://localhost:8080/index.jsp and click on the link
Search Employees, I get this exception in the browser -

javax.servlet.ServletException: Cannot retrieve definition for form bean searchForm on action /search

I have checked and rechecked the struts-config.xml file and everything seems to be all right.

I am uploading the code on this link download code

This link will take you to a website called rapidsahre.de
Scroll down and click on the FREE button to download the code.

Please help
Thanks in advance.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Niranjan,
In the Struts config XML, SearchAction takes a SearchForm. Where is the form on index.jsp that is getting passed to it?

In the future (or for follow ups to this question), please post the relevant code snippets in the forum. It's a lot of steps to download this large zip file - which discourages people from looking at the problem.

In this case, the relevant files would be the XML and the index.jsp.
 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Niranjan,

Your expception basically tells that the Form Bean has not been associated correctly with struts-config or it is not present in the classes folder. There may be some typos also which are the most un-noticable errors.
This link gives a great refernce to the common struts errors. This should be helpful for common errors.
http://www.geocities.com/Colosseum/Field/7217/SW/struts/errors.html.

If some problem exists, please post the JSP, action class adn struts-config.
Regards,
Roshani
 
The only cure for that is hours of television radiation. And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic