aspose file tools*
The moose likes Struts and the fly likes Need Help in running a struts applicaton Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Need Help in running a struts applicaton" Watch "Need Help in running a struts applicaton" New topic
Author

Need Help in running a struts applicaton

Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
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.


SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29255
    
140

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
RoshaniG Gopal
Ranch Hand

Joined: May 15, 2006
Posts: 180
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


Regards,<br />Roshani
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need Help in running a struts applicaton
 
Similar Threads
Issues with IE and Mozilla Firefox
Jsp 2.0 files redirecting to an unknown site
Is it possible, More than one tomcat running in the one system?
Switching btw 2 protocols
URL - getting appended