It's not a secret anymore!
The moose likes Struts and the fly likes  Struts2 Action problem Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark " Struts2 Action problem Problem" Watch " Struts2 Action problem Problem" New topic

Struts2 Action problem Problem

Asgar Ali

Joined: Sep 01, 2008
Posts: 8
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
<li><a href="HelloWorld.action">Run Struts 2 Hello World Application</a></li>
There is no Action mapped for namespace / and action name HelloWorld. - [unknown location]
my struts.xml code
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
<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">

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


Asgar Ali

Joined: Sep 01, 2008
Posts: 8
solved this problem by moving struts.xml into src folder....
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 689

For your Struts2 application you have to put your Struts.xml file into your source package and put 5 jar file into lib.

With this zero configuration you can start your application with struts2 application.

Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
I agree. Here's the link:
subject: Struts2 Action problem Problem
jQuery in Action, 3rd edition