You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "pawan (JIRA)" <ji...@apache.org> on 2008/04/26 08:35:05 UTC

[jira] Issue Comment Edited: (WW-2618) struts.codebehind.defaultPackage

    [ 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/25/08 11:33 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" 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.

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


      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/<action-name>.action" URI, my custom interceptor stack is invoked. However, if I use codebehind based URI (i.e. myRootContext/packagename/<actionName>), 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.

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.