Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hello world issue

 
suraj savaratkar
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 299
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic