[
https://issues.apache.org/struts/browse/WW-2618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43749#action_43749 ]
qwerts edited comment on WW-2618 at 4/27/08 10:06 PM:
-----------------------------------------------------
We have a struts.xml and it contains the packge my-default-package, to be used as default package. i have assigned the constant "struts.codebehind.defaultPackage" to "my-default-package" just before this package element for my-default-package.
We have a requirement for our own interceptor stack. So, I added my stack declaration and def-interceptor-ref element within the package.
If create an entry for an action and invoke it using "myRootContext/<configured-action-name>.action" URI, my custom interceptor stack is invoked. However, if I use codebehind based URI (i.e. myRootContext/<action-class-package>/<actionClassName>), the defaultStack is invoked (i.e. the stack from codebehind). All that my interceptor does is to log the URIs invoked. But it is never called when using the URI that uses code behind.
I am not trying any fancy statements/configurations. Just vanilla configuration that uses interceptors.
Versions being used:
-------------------------------------
Spring: 2.5.1
struts: 2.1.0 (dev version)
struts2-core-2.1.0.jar
ognl-2.7.1.jar
xwork2-2.1.0.jar
freemarker-2.3.9.jar
struts2-codebehind-plugin-2.1.0.jar
struts2-spring-plugin-2.0.11.jar
struts2-sitemesh-plugin-2.1.0.jar
If of any value:
------------------------------------
Commons-logging-1.1.jar
Thanks for the amazingly quick response.
~Pawan
was (Author: qwerts):
We have a struts.xml and it contains the packge my-default-package, to be used as default package. i have assigned the constant "struts.codebehind.defaultPackage" just before this package element.
We have a requirement for our own interceptor stack. So, I added my stack declaration and def-interceptor-ref element within the package.
If create an entry for an action and invoke it using "myRootContext/<configured-action-name>.action" URI, my custom interceptor stack is invoked. However, if I use codebehind based URI (i.e. myRootContext/class-package-name/<actionClassName>), the defaultStack is invoked (i.e. the stack for codebehind). All that my interceptor does is to log the URIs invoked. But it is never called when using the URI that uses code behind.
I am not trying any fancy statements/configurations. Just vanilla configuration that uses interceptors.
I am using Struts 2.1 and code behind was the latest version available around 50 days back. i will update the versions once i am in office (i.e. on monday).
Thanks for the amazingly quick response.
~Pawan
> struts.codebehind.defaultPackage
> --------------------------------
>
> Key: WW-2618
> URL:
https://issues.apache.org/struts/browse/WW-2618> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - CodeBehind
> Environment: Spring 2.5, Tomcat, Struts 2 + Code behind, Windows XP SP2
> Reporter: pawan
>
> an entry in struts.xml of <constant name="struts.codebehind.defaultPackage" value="my-default-package" /> does not override the default package name.
> my struts.xml is being loaded after the struts-plugin.xml which would have already set the value.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.