Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » There is no Action mapped for namespace / and action name Hello.
There is no Action mapped for namespace / and action name Hello. [message #214565] Fri, 30 May 2008 03:50 Go to next message
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 08:27 Go to previous messageGo to next message
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 #214616 is a reply to message #214579] Fri, 30 May 2008 19:48 Go to previous messageGo to next message
Eclipse User
Originally posted by: abc.gmail.com

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
Re: There is no Action mapped for namespace / and action name Hello. [message #214708 is a reply to message #214616] Mon, 02 June 2008 05:12 Go to previous messageGo to next message
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
>
Re: There is no Action mapped for namespace / and action name Hello. [message #214762 is a reply to message #214708] Tue, 03 June 2008 02:16 Go to previous messageGo to next message
Eclipse User
Originally posted by: abc.mail.com

Hi,
where can i upload the war file
thank you
Re: There is no Action mapped for namespace / and action name Hello. [message #214769 is a reply to message #214762] Tue, 03 June 2008 05:00 Go to previous message
Eclipse User
Originally posted by: wknauf_NO_._INSIDE_hg-online.de

I don't know how you could do it through the forum website, I use a NNTP client
for this.

You could mail it to me: wolfgang DOT knauf AT gmx DOT de

Best regards

Wolfgang

kannalu schrieb:
> Hi,
> where can i upload the war file
> thank you
>
Previous Topic:Reusing WTP Server definitions for deploying artifacts
Next Topic:Setting TCP/IP Monitor max message size
Goto Forum:
  


Current Time: Fri Apr 18 06:54:10 EDT 2014

Powered by FUDForum. Page generated in 0.03797 seconds