• 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

Struts problem

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do you know that the Action is not getting called? What is happening on the browser window?
 
sachin pachpute
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic