struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: Regarding latest struts 2.3.x changes and issues with DMI and Wildcards
Date Wed, 05 Feb 2014 09:33:32 GMT
2014-01-30 Manuel López Blasi <lopezblasi@conicet.gov.ar>:
> Lukasz:  As i told to Eric i think we're gonna implement some additional
> security checking mechanism, maybe a last Interceptor in the stack, we'll
> see.
>
> "for question 2)Prepare interceptor: So there's no way of remove the
> "prepare" prefix? Maybe other implementation of that Interceptor?
>
> It is, it depends on your needs, you can change default stack
> configuration - read about stacks in Struts. (...)"
>
> About PrepareInterceptor: i have the very same stack we've been using for
> some years now, it has always been working ok with this order, we're using
> the
> paramsPrepareParamsStack , it's defined as follows:
>
> <interceptor-stack name="paramsPrepareParamsStack">
>                 <interceptor-ref name="exception"/>
>                 <interceptor-ref name="alias"/>
>                 <interceptor-ref name="i18n"/>
>                 <interceptor-ref name="checkbox"/>
>                 <interceptor-ref name="multiselect"/>
>                 <interceptor-ref name="params">
>                     <param
> name="excludeParams">^dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,^parameters\..*,^action:.*,^method:.*</param>
>                 </interceptor-ref>
>                 <interceptor-ref name="servletConfig"/>
>                 <interceptor-ref name="prepare"/>
>                 <interceptor-ref name="chain"/>
>                 <interceptor-ref name="modelDriven"/>
>                 <interceptor-ref name="fileUpload"/>
>                 <interceptor-ref name="staticParams"/>
>                 <interceptor-ref name="actionMappingParams"/>
>                 <interceptor-ref name="params">
>                     <param
> name="excludeParams">^dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,^parameters\..*,^action:.*,^method:.*</param>
>                 </interceptor-ref>
>                 <interceptor-ref name="conversionError"/>
>                 <interceptor-ref name="validation">
>                     <param
> name="excludeMethods">input,back,cancel,browse</param>
>                 </interceptor-ref>
>                 <interceptor-ref name="workflow">
>                     <param
> name="excludeMethods">input,back,cancel,browse</param>
>                 </interceptor-ref>
>             </interceptor-stack>
>
> "(...)And when do you see that
> the prepareXXX method is called? In logs? In debug mode? Why do think
> it is a problem?"
>
> I'm debugging
> com.opensymphony.xwork2.interceptor.PrefixMethodInvocationUtil.java
>
> in the method public static void invokePrefixMethod(ActionInvocation
> actionInvocation, String[] prefixes) throws InvocationTargetException,
> IllegalAccessException {
>
> Method method = getPrefixedMethod(prefixes, methodName, action);
>    < wich in turn calls >
>         public static Method getPrefixedMethod(String[] prefixes, String
> methodName, Object action) {
>              < here's where the methodName is prefixed >
>                String prefixedMethodName = prefixe + capitalizedMethodName;
>
>
> It's not a problem per se but up to the latest version of the framework i've
> been using , struts 2.1.8 , that wasn't happening, no appending at all,
> if a specified <s:submit action="Action_method"  > the method invocated
> would have been "method()" and not "prepareMethod()" or "doPrepareMethod()"
> like it's happening now. Basically i would have to rewrite the whole
> application again regarding method names, i'd like to avoid that if
> possible.
> Maybe there's some congi tweaking to do with that issue.

It just a log entry, nothing else. Please read carefully how
PrepareInterceptor works - if you don't use it, you can remove it from
stack. Basically prepare interceptor is used to prepare action for
execution, so

request (some.action) ->
  prepare interceptor ->
    call prepare()
  execute action ->
    call execute()


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Mime
View raw message