Link to home
Start Free TrialLog in
Avatar of jwright9
jwright9

asked on

Problem mapping an Action to a namespace

I am trying to get an action in a Struts 2 app to work but I am coming up with this error in my console.  Is there any known fix for this?

There is no Action mapped for namespace /jsp/myApp/screenscrape and action name runEarningsAlerts. - [unknown location]
Avatar of ProgSysAdmin
ProgSysAdmin

Check your struts-config.xml file to see that you have something similar to this:

<struts-config>
      <form-beans>
            <form-bean name="searchForm"
                           type="org.SearchForm"/>
      </form-beans>
      <action-mappings>
            <action path="/Search"
                        name="searchForm"
                        type="org.SearchAction" >
                  <forward name="Status" path="/status.jsp"/>
                  <forward name="NotFound" path="/login.jsp"/>
            </action>
      </action-mappings>
</struts-config>

Where type="org.SearchAction" defines your action class
Avatar of jwright9

ASKER

ProgSysAdmin, Thanks for your response but I am using the struts 2  struts.xml format for my configuration.
ASKER CERTIFIED SOLUTION
Avatar of ProgSysAdmin
ProgSysAdmin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I tried your code but I got the same result.  I know yours should work.  So I'll accept yours.