struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohamed SIDI <mhm.s...@gmail.com>
Subject Re: WARNING: No configuration found for the specified action: 'HelloWorld' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
Date Wed, 12 Jan 2011 12:55:07 GMT
Hello,

You have tu put an "/" before yout action name in your JSP page, try with
this :

<s:form action="/HelloWorld">
       <s:textfield name="name" label="Your name"/>
       <s:submit/>
               </s:form>
and I think you have tu put / in your namesapce definition

Best Regards


2011/1/12 Nuwan Arambage <nuwan.arambage@gmail.com>

> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE struts PUBLIC
>    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>    "http://struts.apache.org/dtds/struts-2.0.dtd">
>
> <struts>
>        <constant name="struts.devMode" value="true" />
>        <package name="default" namespace="" extends="struts-default">
>                <action name="HelloWorld" class="com.nuwan.HelloWorld">
>                        <result name="success">HelloWorld.jsp</result>
>                </action>
>        </package>
> </struts>
>
> this is my structs.xml looks like and index.jsp is  as follows
>
> <%@ page contentType="text/html; charset=UTF-8" %>
> <%@ taglib prefix="s" uri="/struts-tags" %>
> <html>
>        <head>
>    <title>Name Collector</title>
>        </head>
>        <body>
>            <hr>
>                <h4>Enter your name so that we can customize a greeting just
> for you!</h4>
>                <s:form action="HelloWorld">
>        <s:textfield name="name" label="Your name"/>
>        <s:submit/>
>                </s:form>
>            <hr>
>        </body>
> </html>
>
> I think this will helpful to go further pinpointing the fault.
>
> On Wed, Jan 12, 2011 at 6:13 PM, Dave Newton <davelnewton@gmail.com>
> wrote:
> > Struts. Struts 2.
> >
> > Any startup messages in the log? We have no idea what your
> > configuration looks like or how you're calling the action--not sure
> > how to help other than normal web app debugging tips.
> >
> > Dave
> >
> > On Wednesday, January 12, 2011, Nuwan Arambage <nuwan.arambage@gmail.com>
> wrote:
> >> Hi,
> >> I'm a newbie to the structs2 and I was trying to write my first hello
> >> world application using structs2.Once I have tried it , I was getting
> >> the following warning message.
> >> WARNING: No configuration found for the specified action: 'HelloWorld'
> >> in namespace: ''. Form action defaulting to 'action' attribute's
> >> literal value.
> >>
> >> As far as I know , I have correctly mapped the actions, I couldn't
> >> find out what was wrong to surface this message.Why does this warning
> >> message popping up & eventually I wouldn't be able to run the
> >> application.
> >>
> >> I'm looking forward to better answer form structs2 community
> >> Thanks
> >> --
> >>  Fail again. Fail better
> >>
> >> With Regards ,
> >> Nuwan  Arambage
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
>
> --
>  Fail again. Fail better
>
> With Regards ,
> Nuwan  Arambage
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 


Cordialement

Mohamed

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message