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 hello world issue 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 "hello world issue" Watch "hello world issue" New topic
Author

hello world issue

suraj savaratkar
Ranch Hand

Joined: May 17, 2010
Posts: 67
Hi,
I have one application issue; i'm doing an simple helloworld struts example but it shown as "No configuration found for the specified action: 'Hello' in namespace: ''. Form action defaulting to 'action' attribute's literal value."

struts.xml
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="false" />
<constant name="struts.custom.i18n.resources" value="ApplicationResources" />

<package name="dafault" extends="/struts-default" namespace="/">
<action name="Hello" class="logindata.LoginAction" method="execute">
<result name="success">/welcome.jsp</result>
<result name="error">/Login.jsp</result>
</action>
</package>
</struts>

Login.jsp

<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<title>Struts 2 - Login Application | ViralPatel.net</title>
</head>
<body>
<h2>Struts 2 - Login Application</h2>
<s:actionerror />
<s:form action="Hello" method="post">
<s:textfield name="username" key="username" size="20" />
<s:password name="password" key="password" size="20" />

<s:submit/>
</s:form>
</body>
</html>

Please help me out..
Thanks..
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi,

I can see that your action is in logindata package but you have used package name as default so i think you need to make changes there .Give the package name you have used instead of default.

Regards
Jatan
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: hello world issue
 
Similar Threads
Problems deploying struts 2 app on weblogic 10gR3
Login page in eclipse
The requested resource () is not available
Form Validation using action-validation.xml file
Http Server 404