« Return to Thread: [jira] Created: (WW-2618) struts.codebehind.defaultPackage

[jira] Commented: (WW-2618) struts.codebehind.defaultPackage

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View in Thread


    [ https://issues.apache.org/struts/browse/WW-2618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43764#action_43764 ]

Wes Wannemacher commented on WW-2618:
-------------------------------------

Jeromy, I thought the same thing and started testing. I noticed a few things in my sample app... 1. If I am not using a namespace, the settings are honored. I have a customer interceptor that I want called all the time. So, I configured the following in my struts.xml -

    <constant name="struts.codebehind.defaultPackage" value="wrestlingBase"/>
    <package name="wrestlingBase" extends="struts-default">
        <interceptors>
            <interceptor name="wrestlingSessionPopulator" class="wrestlingSessionPopulator"></interceptor>
            <interceptor-stack name="wrestlingStack">
                <interceptor-ref name="defaultStack"></interceptor-ref>
                <interceptor-ref name="wrestlingSessionPopulator"></interceptor-ref>
            </interceptor-stack>
        </interceptors>
       
        <default-interceptor-ref name="wrestlingStack"></default-interceptor-ref>
    </package>

Now, when I call /${contextRoot}/login.action, the appropriate stack is used. However, when I am in a namespace, like if I call -
/${contextRoot}/user/manageProfile.action, then the defaultStack is used. Both login.action and manageProfile.action are configured by codebehind. login.action is mapped to ActionSupport, and manageProfile has an action class. I'll test a bit more and let you know what I find.

-Wes

> 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.

 « Return to Thread: [jira] Created: (WW-2618) struts.codebehind.defaultPackage

LightInTheBox - Buy quality products at wholesale price