You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Erik Marcor Thaysen <em...@dibs.dk> on 2007/10/31 11:31:15 UTC

Action warnings for posting URLs with Struts 2.0.11

Hi,

I just upgraded Struts from 2.0.8 to 2.0.11. Now I receive warnings in
the log, such as this:

11:21:46,977 WARN  [org.apache.struts2.components.Form] No configuration
found for the specified action:
'https://emtdibs.arc/metaadmin/payreturn.pml' in namespace: '/'. Form
action defaulting to 'action' attribute's literal value.

Q: What must I do to take care of the warnings?

The form is defined in a JSPF file like this:

<s:form name="cancelform" action="%{#cancelUrl}" method="post">

The documentation for the form tag states, that if the action is not
mapped in struts.xml, Struts will treat the action as a posting URL. It
all works fine, but then why the warnings?

Thanks,
Erik Thaysen

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Action warnings for posting URLs with Struts 2.0.11

Posted by Erik Marcor Thaysen <em...@dibs.dk>.
Thanks for the feedback, Dave!

Dave Newton wrote:
>> Q: What must I do to take care of the warnings?
>>     
>
> Set the debug level of
> org.apache.struts2.components.Form to ERROR or just
> ignore them, at least for now :)
>   
>> It all works fine, but then why the warnings?
>>     
>
> To warn you that you're posting to something that
> isn't configured in the struts.xml file, which is
> probably a mistake in the majority of S2 apps, but not
> necessarily (obviously!)
>   
Unfortunately, setting the debug level is not really an option in my
case. :) Actually we are interested in seeing any warnings, since we aim
to develop without getting any warnings -- for many reasons. But in this
case, where everything is in order, the warning seems a bit misplaced.
The warning should indeed be the default behavior, but perhaps if there
was a way to tell Struts "yes, the action is not mapped in struts.xml,
but I know what I am doing"? Perhaps we need a parameter such as
'literal="true"' to allow literal URLs?

-Erik

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Action warnings for posting URLs with Struts 2.0.11

Posted by Dave Newton <ne...@yahoo.com>.
--- Erik Marcor Thaysen <em...@dibs.dk> wrote:
> 11:21:46,977 WARN
[org.apache.struts2.components.Form]
> No configuration found for the specified action:
> 'https://emtdibs.arc/metaadmin/payreturn.pml' in
> namespace: '/'. Form action defaulting to 'action'
attribute's literal
> value.
> 
> Q: What must I do to take care of the warnings?

Set the debug level of
org.apache.struts2.components.Form to ERROR or just
ignore them, at least for now :)

> It all works fine, but then why the warnings?

To warn you that you're posting to something that
isn't configured in the struts.xml file, which is
probably a mistake in the majority of S2 apps, but not
necessarily (obviously!)

d.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org