Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RE: Struts Cannot find ActionMappings

 
Michael Sweeney
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • 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"
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Struts forum.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic