• 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

RE: Struts Cannot find ActionMappings

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) I have a normal Struts action mapping in struts-config.xml
<action path="/search"
type="asr.SearchAction"
name="searchForm"
scope="request"
input="/search.jsp">
<exception type="asr.SessionException" key="error.SessionException" path="/exception.jsp"/>
</action>
2) Now, if I do this in my javascript:
whatever.location="search.do"
no problem
3) However if I do this:
whatever.location="search.jsp"
I get "Cannot find ActionMappings"
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moved to the Struts forum.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you set up your web.xml file the way struts suggests, you should have the following entry:


If you have this mapping, you should be able to call a JSP directly without going through an action and not get this error. If you've got something like *.* in your url-pattern, then every url the comes in will go to the action servlet and will have to be configured as an action mapping in your struts-config.xml file. I suspect this may be what's happening
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic