There is no Action mapped for namespace / and action name Hello. [message #214565] |
Fri, 30 May 2008 07:50 |
Eclipse User |
|
|
|
Originally posted by: sadhika06.gmail.com
Hi,
i am new to struts2. i created web-dynami project. Added the 4
jars(freemarker,ognl,struts2-core,xwork) in WEB-INF/lib. and added in the
web.xml
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher </filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
in srtuts.xml
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="false" />
<package name="tutorial" namespace="/tutorial"
extends="struts-default">
<action name="Hello" class="tutorial.Hello">
<result>/hello.jsp</result>
</action>
<!-- Add more actions here -->
</package>
created a tutorial package under the src.
created a Hello.java file under tutorial.
created hello.jsp file under webcontent.
when i run the project i am getting the foll error.
There is no Action mapped for namespace / and action name Hello. -
[unknown location]
can anybody help me in finding the prob.
thanks in advance
bye
|
|
|
Re: There is no Action mapped for namespace / and action name Hello. [message #214579 is a reply to message #214565] |
Fri, 30 May 2008 12:27 |
Eclipse User |
|
|
|
Originally posted by: wknauf_NO_._INSIDE_hg-online.de
Hi,
I think you need to specify the package for your actions in web.xml as a init
param of the struts2 filter:
<filter>
<filter-name>struts</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
<init-param>
<param-name>actionPackages</param-name>
<param-value>com.package.of.my.actions</param-value>
</init-param>
</filter>
The rest of your config seems OK (though I think you don't need the
namespace="/tutorial" attribute in your struts.xml).
Hope this helps
Wolfgang
|
|
|
|
Re: There is no Action mapped for namespace / and action name Hello. [message #214708 is a reply to message #214616] |
Mon, 02 June 2008 09:12 |
Eclipse User |
|
|
|
Originally posted by: wknauf_NO_._INSIDE_hg-online.de
Hi,
I don't have any further ideas. If your code is not too large, you could export
it as a WAR file and post it here, maybe I can help.
Wolfgang
kannalu schrieb:
> Hi WolfGanag,
>
> Thanks for ur reply.
> i tried adding init-param but no luck, still same error.
> i also tried the zero-configuration like renaming the action class Hello
> to HelloAction,but no luck
>
> bye
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02483 seconds