On Thursday 11 September 2008 21:37:58 [EMAIL PROTECTED] wrote:
> What package/class contains your
>
> String name = invocation.getProxy().getConfig().getPackageName();
>

The call to String name = invocation.getProxy().getConfig().getPackageName(); 
is made by an interceptor which is defined in the "default" package. I've 
experimented further by adding a second empty package after the "empty" 
package in struts.xml (called "bug" extends "default") and now a call to any 
action in the "default"  package is showing as being in "bug"

If I reverse the declarations within struts.xml so I define in order 
packages "default- extends struts-default", "secure extends default", "bug 
extends default" & "empty extends default" I see actions in "default" showing  
in "empty"

Any call to an action in "secure extends default" is still correctly 
identified as being in package " secure" unless I remove the "empty" 
and "bug" package definitions at which point all actions are shown as being 
in "secure"

Regards


> On Thu, Sep 11, 2008 at 5:46 AM, Roger <[EMAIL PROTECTED]> wrote:
> > I have a struts.xml with two package tags. The first package is named
> > <package
> > name="default" extends="struts-default"> and contains my custom
> > interceptor stack. The second package is named <package name="secure"
> > extends="default">
> > so that my custom interceptor stack is available to actions in the secure
> > package.
> >
> > In my custom interceptor stack I have an interceptor in which I am trying
> > to
> > determine in which package the action being called is located.
> >
> > name = invocation.getProxy().getConfig().getClassName(); correctly
> > identifies
> > the class of the action being called, but
> >
> > String name = invocation.getProxy().getConfig().getPackageName(); returns
> > the
> > name "secure" for all actions regardless of the package the class is
> > actually
> > located in. If I now add a third package tag <package name="empty"
> > extends="default"> that contains no actions at all, String name =
> > invocation.getProxy().getConfig().getPackageName(); now returns the
> > string "empty" for all actions in packages "default" and "secure"!
> >
> > Have I found a bug, or am I fundementally misunderstanding how packages
> > work?
> > I'm using version 2.0.11
> >
> > Regards
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to