struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <>
Subject Re: Support for Convention-Plugin through the Junit-Plugin
Date Sun, 17 Mar 2013 12:50:52 GMT
2013/3/17 Christian Grobmeier <>:
> It says, it would be good to have the convention plugin supported by
> the junit plugin. I thought this should be the case already and did
> some testing on my local box:
> - added the convention plugin to my pom
> - created content/hello-world.jsp in resources
> - create a mini test case which just does:
> String output = executeAction("/hello-world");
> I have expected that all my other test cases will fail, since my guess
> was all the urls have changed with the addition of the convention
> plugin. Actually this was not the case and everything worked well,
> except of course the convention-testcase.

No they should not, as urls should remains as is, did you try to use
"/hello-world.action" instead? No extension has nothing to do with the
Convention plugin - you can have the same with xml based configuration
just define struts.action.extension.

> Now I suspect there is more work to be done, and something in this class:
> should be changed to make it work, esp in the initDispatcherParams or
> initDispatcher method. Unfortunately a brief look into the Convention
> plugin didn't teach me how it actually works.
> Does anybody have a pointer for me where to start?

The Convention plugin is responsible for a configuration, so basically
what it does is to scan a classpath to look for actions based on
defined constants. It's addition to normal xml based configuration,
where the Convention plugin will just add configuration of discovered

I have no idea where to start, but you can check
PackageBasedActionConfigBuilderTest. Basically
ClasspathConfigurationProvider and ClasspathPackageProvider have to be
included in configuration building process.

+ 48 606 323 122

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message