This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 684

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
It is sorta covered in the JavaRanch Style Guide.
subject: Struts2 Action problem Problem
Similar Threads
Request not able to reach Action class in Struts2
problem in Struts2 while running an application
web.xml problem in struts2
Struts2: Accessing a request Parameter from Action
Need Help - Struts2 s:select issue - Urgent