GeeCON Prague 2014*
The moose likes Struts and the fly likes RE: Struts Cannot find ActionMappings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "RE: Struts Cannot find ActionMappings" Watch "RE: Struts Cannot find ActionMappings" New topic
Author

RE: Struts Cannot find ActionMappings

Michael Sweeney
Greenhorn

Joined: Nov 01, 2004
Posts: 5
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"


mesas
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61310
    
  66

Moved to the Struts forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RE: Struts Cannot find ActionMappings