You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by chengas123 <be...@gmail.com> on 2011/08/28 22:13:08 UTC

Convention plugin can't find Actions

Hi,

I created the action below in a package ending with "action" and extended
ActionSupport.  Yet, the convention plugin is not finding the action.  I
installed the config browser plugin and it does not see the action.  Any
tips on how I can debug this?  I'm running this in embedded Jetty.  Does
that have anything to do with it?

Thanks,
Ben


package com.benmccann.webtemplate.frontend.action;

import com.opensymphony.xwork2.ActionSupport;

/**
 * @author Ben McCann (benmccann.com)
 */
public class Test extends ActionSupport {
  
  private static final long serialVersionUID = 1L;

  public String execute() throws Exception {
    System.out.println("EXECUTE");
    return SUCCESS;
  }

}


--
View this message in context: http://struts.1045723.n5.nabble.com/Convention-plugin-can-t-find-Actions-tp4744110p4744110.html
Sent from the Struts - User mailing list archive at Nabble.com.

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


Re: Convention plugin can't find Actions

Posted by Christian Grobmeier <gr...@gmail.com>.
On Mon, Aug 29, 2011 at 3:02 AM, chengas123 <be...@gmail.com> wrote:
> Got it working.  I needed to set the constants below in my struts.xml.  Could
> be good to add this to the docs for other people using Jetty in embedded
> mode.
>  <constant name="struts.convention.action.fileProtocols"
> value="jar,code-source" />
>  <constant name="struts.convention.exclude.parentClassLoader" value="false"
> />

I added it to the wiki, thanks for coming back with it. Pretty sure I
need it in 2 months or so.
https://cwiki.apache.org/confluence/display/WW/Convention+Plugin#ConventionPlugin-Jetty%28embedded%29

Cheers,
Christian

>
> -Ben
>
>
> --
> View this message in context: http://struts.1045723.n5.nabble.com/Convention-plugin-can-t-find-Actions-tp4744110p4744666.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
http://www.grobmeier.de

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


Re: Convention plugin can't find Actions

Posted by chengas123 <be...@gmail.com>.
Got it working.  I needed to set the constants below in my struts.xml.  Could
be good to add this to the docs for other people using Jetty in embedded
mode.
  <constant name="struts.convention.action.fileProtocols"
value="jar,code-source" />
  <constant name="struts.convention.exclude.parentClassLoader" value="false"
/>

-Ben


--
View this message in context: http://struts.1045723.n5.nabble.com/Convention-plugin-can-t-find-Actions-tp4744110p4744666.html
Sent from the Struts - User mailing list archive at Nabble.com.

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


Re: Convention plugin can't find Actions

Posted by Dave Newton <da...@gmail.com>.
IIRC it needs to be in a package ending in action/actions/something-else and
the name needs to end in Action, at least that was the case when I wrote the
book covering 2.0. If changing the package suffix to "actions" doesn't do it
then you'll probably want to take a quick gander and the scanning code.

Dave

On Sun, Aug 28, 2011 at 4:20 PM, chengas123 <be...@gmail.com>wrote:

> Thanks for the suggestion.  Didn't help though.  Shouldn't the fact that it
> extends ActionSupport be enough anyway?
>
> --
> View this message in context:
> http://struts.1045723.n5.nabble.com/Convention-plugin-can-t-find-Actions-tp4744110p4744116.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Convention plugin can't find Actions

Posted by chengas123 <be...@gmail.com>.
Thanks for the suggestion.  Didn't help though.  Shouldn't the fact that it
extends ActionSupport be enough anyway?

--
View this message in context: http://struts.1045723.n5.nabble.com/Convention-plugin-can-t-find-Actions-tp4744110p4744116.html
Sent from the Struts - User mailing list archive at Nabble.com.

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


Re: Convention plugin can't find Actions

Posted by Dave Newton <da...@gmail.com>.
Try naming it TestAction.

Dave

On Sun, Aug 28, 2011 at 4:13 PM, chengas123 <be...@gmail.com>wrote:

> Hi,
>
> I created the action below in a package ending with "action" and extended
> ActionSupport.  Yet, the convention plugin is not finding the action.  I
> installed the config browser plugin and it does not see the action.  Any
> tips on how I can debug this?  I'm running this in embedded Jetty.  Does
> that have anything to do with it?
>
> Thanks,
> Ben
>
>
> package com.benmccann.webtemplate.frontend.action;
>
> import com.opensymphony.xwork2.ActionSupport;
>
> /**
>  * @author Ben McCann (benmccann.com)
>  */
> public class Test extends ActionSupport {
>
>  private static final long serialVersionUID = 1L;
>
>  public String execute() throws Exception {
>    System.out.println("EXECUTE");
>    return SUCCESS;
>  }
>
> }
>
>
> --
> View this message in context:
> http://struts.1045723.n5.nabble.com/Convention-plugin-can-t-find-Actions-tp4744110p4744110.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>