File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Struts problem" Watch "Struts problem" New topic
Author

Struts problem

sachin pachpute
Ranch Hand

Joined: Nov 04, 2004
Posts: 38
Hi,

I m developing a small struts application. In my application after filling values in jsp page and submiting that form, my Action implementation class(SearchAction) is not getting called whereas ActionForm imlementation class(SearchForm) is printing values on server console.

URL after submiting a form is :- http://localhost/MiniHR/search.do

<action-mappings> element in struts-config.xml is:-

<action-mappings>
<action path="/search"
type="com.jamesholmes.struts.SearchAction"
name="searchForm"
scope="request"
validate="true"
input="/search.jsp">
<forward name="search" path="/search.jsp"/>
</action>
</action-mappings>

Please help.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4725

How do you know that the Action is not getting called? What is happening on the browser window?


A good workman is known by his tools.
sachin pachpute
Ranch Hand

Joined: Nov 04, 2004
Posts: 38
browser is blank, and i concluded that action is not getting called because s.o.p. written in ActionForm implemented class(SearchForm)are getting printed on tomcat console but not of Action implemented class(SearchAction).My first line in execute method of SearchAction is S.o.p(System.out.pri....) which is not printed.
Manoj Raghuwanshi
Ranch Hand

Joined: Jun 20, 2004
Posts: 75
check syntax of your execute method it should be
public ActionForward(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) in that order because u r overriding this method from struts Action class
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Struts problem
 
Similar Threads
Problem with html:link forward="" tag
Problem forwarding to another page using struts.
RE: Struts Cannot find ActionMappings
Missing message for key
server encountered an internal error ;while running application