• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

hello world issue

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Ranch Hand
Posts: 300
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic