You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Roger Varley <ro...@googlemail.com> on 2007/05/21 17:46:10 UTC

[S2] Problem with ! notation

Hi

I'm trying to call a method on my action using the ! notation as
explained in the CRUD demo. If I call my action from the browser bar
as http://localhost:8084/Tiger/StartOrder.action then the execute()
method runs. If I call
http://localhost:8084/Tiger/StartOrder!execute.action then I get the
Struts error page with the message There is no Action mapped for
namespace / and action name StartOrder!execute. - [unknown location]
(I've checked it with !Execute as well). I'm obviously missing
something ....

Regards
Roger

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


Re: [S2] Problem with ! notation

Posted by Roger Varley <ro...@googlemail.com>.
On 21/05/07, Roger Varley <ro...@googlemail.com> wrote:
> >
> > You might have to post config snippets... I'm assuming
> > Tiger is the webapp?
> >

Dave

Forget the previous post - it's working after a fashion.
http://localhost:8084/Tiger/StartOrder.action runs OK and calls
StartOrder.input().
http://localhost:8084/Tiger/StartOrder!input.action runs OK and calls
StartOrder.input()
http://localhost:8084/Tiger/StartOrder!execute.action fails even
though I have an execute method.

Regards
Roger

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


Re: [S2] Problem with ! notation

Posted by Roger Varley <ro...@googlemail.com>.
>
> You might have to post config snippets... I'm assuming
> Tiger is the webapp?
>

Yes, Tiger is the webapp.

My struts.xml contains
 <action name="StartOrder"
class="com.mysite.ecommerce.actions.StartOrderAction" method="input">
 <result>/startOrder.jsp</result>
</action>

My struts.properties is located in WEB_INF/classes along with the
struts.xml file and contains
struts.devMode = true
struts.enable.DynamicMethodInvocation = true

If I call http://localhost:8084/Tiger/StartOrder.action then I can see
that the input() method is called on StartOrder.action through using
System.out.println(). However
http://localhost:8084/Tiger/StartOrder!input.action gives There is no
Action mapped for namespace / and action name StartOrder!input. -
[unknown location]

Is there anything else you need to see? I don't want to send too much
unneccassary data

Regards
Roger

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


Re: [S2] Problem with ! notation

Posted by Dave Newton <ne...@yahoo.com>.
--- Roger Varley <ro...@googlemail.com> wrote:
> restarted Tomcat but no joy I'm afraid -
>
http://localhost:8084/Tiger/StartOrder!execute.action
> still gives me the error message.

You might have to post config snippets... I'm assuming
Tiger is the webapp?

d.



       
____________________________________________________________________________________You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_html.html

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


Re: [S2] Problem with ! notation

Posted by Roger Varley <ro...@googlemail.com>.
>
> Is dynamic method invocation turned on?
>
> ("Hey dynamic method invocation... you sure are
> looking good today," he cajoled, breathily.)
>

It wasn't. I've changed the struts.properties file from
struts.enable.DynamicMethodInvocation = false to
struts.enable.DynamicMethodInvocation = true and restarted Tomcat but
no joy I'm afraid -
http://localhost:8084/Tiger/StartOrder!execute.action still gives me
the error message.

Regards
Roger

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


Re: [S2] Problem with ! notation

Posted by Nate Drake <nd...@gmail.com>.
Roger Varley <roger.varley <at> googlemail.com> writes:

> 
> > Is dynamic method invocation turned on?
> >
> As an aside, why is dynamic method invocation turned off by default.
> From experience this suggests that either the functionality is
> experimental, or is not the sort of thing you should be using unless
> you have good reason and know what you're doing. Are there any gotchas
> I should know about?
> 
> Regards
> Roger
> 


It may be off by default as it isn't the recommended way to do things. Using
wildcards is the preferred way.

http://struts.apache.org/2.x/docs/action-configuration.html#ActionConfiguration-DynamicMethodInvocation



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


Re: [S2] Problem with ! notation

Posted by Roger Varley <ro...@googlemail.com>.
> Is dynamic method invocation turned on?
>
As an aside, why is dynamic method invocation turned off by default.
>From experience this suggests that either the functionality is
experimental, or is not the sort of thing you should be using unless
you have good reason and know what you're doing. Are there any gotchas
I should know about?

Regards
Roger

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


Re: [S2] Problem with ! notation

Posted by Dave Newton <ne...@yahoo.com>.
--- Roger Varley <ro...@googlemail.com> wrote:
> I'm obviously missing something ....

Is dynamic method invocation turned on?

("Hey dynamic method invocation... you sure are
looking good today," he cajoled, breathily.)

d.



 
____________________________________________________________________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

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