Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Problem mapping an Action to a namespace

Posted on 2010-08-12
Medium Priority
Last Modified: 2013-11-24
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]
Question by:jwright9
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Expert Comment

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

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

Where type="org.SearchAction" defines your action class

Author Comment

ID: 33422433
ProgSysAdmin, Thanks for your response but I am using the struts 2  struts.xml format for my configuration.

Accepted Solution

ProgSysAdmin earned 2000 total points
ID: 33423058
I'm sorry.  Here is a snippet of Struts 2 struts.xml code that I found which I modified to fit what you are doing.  The main thing in correcting your error "[unknown location]" is in the class="" section of your file needs to be a valid java class.  I hope this helps.

<?xml version="1.0" encoding="UTF-8" ?>
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"


<package name="earningsAlerts" namespace="/jsp/myApp/screenscrape" extends="struts-default">

<action name="runEarningsAlerts" class="jsp.myApp.screenscrape.EarningsAlerts">


Open in new window


Author Comment

ID: 33423601
I tried your code but I got the same result.  I know yours should work.  So I'll accept yours.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question