This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes struts 2 error ---- Could not find action or result Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts 2 error ---- Could not find action or result" Watch "struts 2 error ---- Could not find action or result" New topic

struts 2 error ---- Could not find action or result

kalaiselvi Bhalerao

Joined: Aug 19, 2011
Posts: 9
Hi everybody

I am getting the error message as below

SEVERE: Could not find action or result
There is no Action mapped for action name display. - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
at Source)

I am using Eclipse ID to create a simple Struts 2 application


"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"

<package name="default" extends="struts-default">
<action name="display" class="example1.action.DisplayName">

<result name="success">/example1/success.jsp</result>
<result name="input">/example1/UserInput.jsp</result>

Action class

package example1.action;

import com.opensymphony.xwork2.ActionSupport;

public class DisplayName extends ActionSupport {
private String message;

private String userName;

public DisplayName() {
System.out.println("DisplayName constructor");

public String execute() {
setMessage("Hello " + getUserName());
return SUCCESS;

public String getMessage() {
return message;

public void setMessage(String message) {
this.message = message;

public String getUserName() {
return userName;

public void setUserName(String userName) {
this.userName = userName;


Input page

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
<%@taglib uri="/struts-tags" prefix="s" %>
<title>User Input</title>
<s:head />
User Input Form
<s:form action="display" >
<s:textfield name="userName" label="User Name" />
<s:submit />

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="" xmlns="" xmlns:web="" xsi:schemaLocation="" id="WebApp_ID" version="2.5">




pl help me to resolve the error.
I assume there is a silly mistake, but i am not able to trace the error.
i guess the tomcat is not able to read struts.xml
debraj mallick
Ranch Hand

Joined: Mar 08, 2011
Posts: 188

hi there,

i think you are missing "namespace"

in struts.xml
kalaiselvi Bhalerao

Joined: Aug 19, 2011
Posts: 9
i did try adding namespace to struts.xml that also gave the same error.
Consider Paul's rocket mass heater.
subject: struts 2 error ---- Could not find action or result
Similar Threads
unknown error while running Struts2 application
The requested resource () is not available.
Is my application running or is it just stuck??
Struts 2 problem-actions cant find the result. WARNING: Could not find action or result
problem in Struts2 while running an application