aspose file tools*
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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hello world issue