Re: Interceptor Stack config

2010-11-18 Thread stanlick
You certainly have accomplished that with



however, Li is right; you did not need to redefine that stack, as it's in
the default xml file in struts-core.  Now then, you will only see this stack
associated with actions in *this* package or it's sub-pacakges and I don't
see any actions defined therein.  You are likely browsing actions defined in
the config-browser itself.

Peace,
Scott

On Thu, Nov 18, 2010 at 6:32 AM, RogerV  wrote:

>
>
>
> Li Ying wrote:
> >
> > Why you define "paramsPrepareParamsStack" again?
> >
> > I believe it is already defined in the default configuration file,
> >
> > you can just use it.
> >
>
> That's what I think I'm trying  to do with the struts.xml ;
>
> 
>
>
>
>
> value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
>
>
>
>
>
>
>
>
>
>
>dojo\..*,^struts\..*
>
>
>
>
>
>
>
>
>
>dojo\..*,^struts\..*
>
>
>
>input,back,cancel,browse
>
>
>input,back,cancel,browse
>
>
>  
>
>
>
>
>
> 
>
>
>
> --
> View this message in context:
> http://old.nabble.com/Interceptor-Stack-config-tp30239747p30247343.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Interceptor Stack config

2010-11-18 Thread RogerV



Li Ying wrote:
> 
> Why you define "paramsPrepareParamsStack" again?
> 
> I believe it is already defined in the default configuration file,
> 
> you can just use it.
> 

That's what I think I'm trying  to do with the struts.xml ;

















dojo\..*,^struts\..*









dojo\..*,^struts\..*



input,back,cancel,browse


input,back,cancel,browse


  









-- 
View this message in context: 
http://old.nabble.com/Interceptor-Stack-config-tp30239747p30247343.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Interceptor Stack config

2010-11-18 Thread Li Ying
Why you define "paramsPrepareParamsStack" again?

I believe it is already defined in the default configuration file,

you can just use it.


2010/11/18 RogerV :
>
> Hi
>
> I'm setting up a new Struts 2 project - the first time I've started from
> scratch in ages. I think it must be age, but I seem to have forgotten a lot
> of the basics :(
>
> Could someone look at my struts.xml and tell me why the config-browser
> plugin shows that I'm using the default stack rather than the
> prepareParamsPrepare stack as intended.
>
> Regards.
>
> 
>
>
>    
>    
>     value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
>
>        
>        
>        
>                
>                
>                
>                
>                
>                
>                    dojo\..*,^struts\..*
>                
>                
>                
>                
>                
>                
>                
>                
>                
>                    dojo\..*,^struts\..*
>                
>                
>                
>                    input,back,cancel,browse
>                
>                
>                    input,back,cancel,browse
>                
>            
>          
>        
>
>    
>
>
> 
> --
> View this message in context: 
> http://old.nabble.com/Interceptor-Stack-config-tp30239747p30239747.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Interceptor Stack config

2010-11-18 Thread RogerV



li wei-4 wrote:
> 
> Hi RogerV
> 
> I don't think config-browser plugin tells you which stack are you using,
> it just show you all of actions in namespaces you have configured,
> of course, including default namespace
> 

It lists the interceptors in the order that they are configured, so I would
expect to see the parameter interceptor listed twice. In addition, placing
breakpoints on the parameter setters and the prepare method in my action
confirms that I am not using the paramPrepareParam stack.

Regards
-- 
View this message in context: 
http://old.nabble.com/Interceptor-Stack-config-tp30239747p30247174.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Interceptor Stack config

2010-11-18 Thread li wei

Hi RogerV

I don't think config-browser plugin tells you which stack are you using,
it just show you all of actions in namespaces you have configured,
of course, including default namespace

(2010/11/18 18:18), RogerV wrote:

Hi

I'm setting up a new Struts 2 project - the first time I've started from
scratch in ages. I think it must be age, but I seem to have forgotten a lot
of the basics :(

Could someone look at my struts.xml and tell me why the config-browser
plugin shows that I'm using the default stack rather than the
prepareParamsPrepare stack as intended.

Regards.




 
 
 

 
 
 
 
 
 
 
 
 
 dojo\..*,^struts\..*
 
 
 
 
 
 
 
 
 
 dojo\..*,^struts\..*
 
 
 
 input,back,cancel,browse
 
 
 input,back,cancel,browse
 
 
   
 

 






-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Interceptor stack

2010-05-19 Thread Martin Gainty

this is good news roger

//assume i have this ParentPackage annotation declaration

package org.apache.struts2.convention.actions.parentpackage;
import org.apache.struts2.convention.annotation.ParentPackage;
/**
 * 
 * This is a parent package usage action.
 * 
 */
@ParentPackage("class-level")
public class ClassLevelParentPackageAction {
public String execute() {
return null;
}
}
//and here is testResultPath method which tests class-level assignment
public void testResultPath() throws Exception {
ServletContext context = mockServletContext("/class-level");
// Test with a result path
PackageConfig packageConfig = createPackageConfigBuilder("/namespace"); 

this.conventionsService = new ConventionsServiceImpl("/not-used");
DefaultResultMapBuilder builder = new DefaultResultMapBuilder(context, 
container, "dispatcher,velocity,freemarker");
Map results = 
builder.build(ClassLevelResultPathAction.class, null, "action", packageConfig);

//the association between annotation value 'class-level', package and namespace 
are clear
verify(context, "/class-level", results, false);
}

//i notice this assignment in struts-plugin.xml for 
struts.convention.default.parent.package specifies convention-default
  
//where convention-default is resolved as extending struts-default
  

//i also notice if i specify ParentPackage package-level value i could resolve 
to a specific package of org.apache.struts2.convention.actions.parentpackage
@org.apache.struts2.convention.annotation.ParentPackage("package-level")
package org.apache.struts2.convention.actions.parentpackage;

//the question is which namespace is assigned for any value for ParentPackage
//ParentPackage("class-level") namespace?
//ParentPackage("package-level") namespace?
//ParentPackage("convention-default") namespace?

Thanks!
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Wed, 19 May 2010 02:30:31 -0700
> From: roger.var...@googlemail.com
> To: user@struts.apache.org
> Subject: Re: Interceptor stack
> 
> 
> 
> 
> Paweł Wielgus wrote:
> > 
> > Hi,
> > try to follow this example:
> > 
> > http://poulwiel.blogspot.com/2009/09/config-browser-plugin-in-struts2.html
> > 
> 
> I was using config-browser - that's how I knew the interceptor stack didn't
> contain my custom interceptors. In the end, I've solved it - I needed the
> @ParentPackage annotation on my actions and then my stack was the one that
> was being used.
> 
> Regards
> -- 
> View this message in context: 
> http://old.nabble.com/Interceptor-stack-tp28592300p28605946.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
  
_
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1

Re: Interceptor stack

2010-05-19 Thread RogerV



Paweł Wielgus wrote:
> 
> Hi,
> try to follow this example:
> 
> http://poulwiel.blogspot.com/2009/09/config-browser-plugin-in-struts2.html
> 

I was using config-browser - that's how I knew the interceptor stack didn't
contain my custom interceptors. In the end, I've solved it - I needed the
@ParentPackage annotation on my actions and then my stack was the one that
was being used.

Regards
-- 
View this message in context: 
http://old.nabble.com/Interceptor-stack-tp28592300p28605946.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Interceptor stack

2010-05-19 Thread Paweł Wielgus
Hi,
try to follow this example:

http://poulwiel.blogspot.com/2009/09/config-browser-plugin-in-struts2.html

Best greetings,
Paweł Wielgus.


2010/5/18 RogerV :
>
> Ok - I'm having a bad start to the day and this is driving me nuts. I'm using
> the Convention plugin, and below I've attached a copy of my struts.xml. As
> you can see I've got two custom interceptors which I'm adding to a copy of
> the param-prepare-param stack.
>
> Through logging I can see that my two custome interceptors are being
> initialized (their constructors are being called) but thereafter neither of
> the interceptors intercept() method is being invoked.
>
> Using the config-browser plugin I see that my custom interceptors are *not*
> in the stack for the default, admin or diagnostic namespaces. Further none
> of the namespaces are using the param-prepare-param stack the first
> Parameter interceptor is missing as well. It looks like I'm using the
> bog-standard struts-default stack.
>
> What on arth have I missed?
>
> Regards
>
> 
>    
>    
>     value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
>
>        
>                
>                     class="com.blackbox.genesis.interceptors.RedirectMessageInterceptor"/>
>                         class="com.blackbox.genesis.interceptors.ConnectionStoreMonitorInterceptor"/>
>          
>                
>                
>                
>                
>                
>                
>                
>                
>                
>                
>                
>                
>                
>                
>                
>                
>                
>                
>                  dojo\..*,^struts\..*
>                
>                
>                
>                    input,back,cancel,browse
>                
>                
>                    input,back,cancel,browse
>                
>            
>            
>
>
>         
>
>
>    
>
>    
>        
>        
> 
> --
> View this message in context: 
> http://old.nabble.com/Interceptor-stack-tp28592300p28592300.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org