[
https://issues.apache.org/struts/browse/WW-2607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jeromy Evans resolved WW-2607.
------------------------------
Resolution: Fixed
Fix Version/s: 2.1.2
Assignee: Jeromy Evans
The exact problem was that PackageConfig.getInterceptorConfig(name) only
returns the interceptors in the current package, not the package hierarchy.
Codebehind's unknown action handler passed the packageConfig to the
InterceptorBuilder which failed to locate the defaultStack.
The patch worked because it substituted the PackageConfig.builder for the
PackageConfig. The builder's implementation of getInterceptorConfig(name)
recurses the package hierarchy. Although this was the right behaviour, I
didn't think it was an appropriate use of the builder.
Instead I created an anonymous InterceptorLocator within the
CodebehindUnknownHandler that recurses the package hierarchy.
Created a new unit test testBuildActionConfigForUknownAction that asserts an
appropriate actionconfig is created.
Thanks Wes!
> Default Mappings are broken in the codebehind plugin
> ----------------------------------------------------
>
> Key: WW-2607
> URL: https://issues.apache.org/struts/browse/WW-2607
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - CodeBehind
> Affects Versions: 2.1.x
> Reporter: Wes Wannemacher
> Assignee: Jeromy Evans
> Fix For: 2.1.2
>
> Attachments: bar.zip, WW-2607.patch
>
>
> When using the codebehind plugin, developers should be able to drop a JSP,
> freemarker or velocity template into their web-app and codebehind should map
> it to ActionSupport automagically. Right now, the app server gives an error
> that an interceptor class cannot be found in default-stack. Attached is a
> simple app to demonstrate. To reproduce, unzip the app, run mvn jetty:run
> then try to hit http://localhost:8080/bar/index.action .
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.