You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ron Chan <rc...@i-tao.com> on 2006/12/11 12:33:25 UTC

Struts2 : Codebehind and Zero Configuration

I've been trying to get Codebehind
http://struts.apache.org/2.x/docs/codebehind-plugin.html
and Zero Configuration
http://struts.apache.org/2.x/docs/zero-configuration.html
to work

found that I had to make a couple of changes

if (resultsByExtension == null) {
    resultsByExtension = loadResultTypes(configuration);
}

was missing from handleUnknownResult, so when using with Zero Conf
loadResutTypes is not run

also resultsByExtension is never null anyway so this code was never run

I made these 2 changes and it now works a treat...

goodbye configuration, hello convention :)



-- 
View this message in context: http://www.nabble.com/Struts2-%3A-Codebehind-and-Zero-Configuration-tf2793411.html#a7793209
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: Struts2 : Codebehind and Zero Configuration

Posted by Don Brown <do...@gmail.com>.
Yeah, I noticed that as well the other day, so it should be fixed in
trunk.  I really need to sit down and do a tutorial showing off the
new conventions in Struts 2 as it really makes building apps easier.
Please let us know how using this plugin works out.

Don

On 12/11/06, Ron Chan <rc...@i-tao.com> wrote:
>
> I've been trying to get Codebehind
> http://struts.apache.org/2.x/docs/codebehind-plugin.html
> and Zero Configuration
> http://struts.apache.org/2.x/docs/zero-configuration.html
> to work
>
> found that I had to make a couple of changes
>
> if (resultsByExtension == null) {
>     resultsByExtension = loadResultTypes(configuration);
> }
>
> was missing from handleUnknownResult, so when using with Zero Conf
> loadResutTypes is not run
>
> also resultsByExtension is never null anyway so this code was never run
>
> I made these 2 changes and it now works a treat...
>
> goodbye configuration, hello convention :)
>
>
>
> --
> View this message in context: http://www.nabble.com/Struts2-%3A-Codebehind-and-Zero-Configuration-tf2793411.html#a7793209
> 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
>
>

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