Hi,
I am some problem with my hello world struts2. I created a project in eclipse and I am trying to run this simple hello world example. I get this error. I am calling it by using this link in my index.jsp
<ul>
<li><a href="HelloWorld.action">Run
Struts 2 Hello World Application</a></li>
</ul>
Error:
There is no Action mapped for namespace / and action name HelloWorld. - [unknown location]
at
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:178
*************************************************************
my struts.xml code
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="true" />
<package name="default" extends="struts-default">
<action name="HelloWorld" class="com.alias.struts.Struts2HelloWorld">
<result>/Hello2World.jsp</result>
</action>
</package>
</struts>
web.xml
**************************************
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>
Struts2Tutorial</display-name>
<filter>
<filter-name>struts</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
Thanks