struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Huber <gregh3...@gmail.com>
Subject Fwd: [VOTE] Struts 2.5 BETA3
Date Fri, 22 Jan 2016 17:26:29 GMT
Best I can come up with is
com.opensymphony.xwork2.config.implActionConfigMatcher creates a new
ActionConfig but then only uses the default allowed names:

return new ActionConfig.Builder(pkgName, orig.getName(), className)
                .methodName(methodName)
                .addParams(params)
                .addResultConfigs(results)
                .addInterceptors(orig.getInterceptors())
                .addExceptionMappings(exs)
                .location(orig.getLocation())
                .build();

Could use the original by appending
.addAllowedMethod(orig.getAllowedMethods()), but I guess it should come
from the ActionConfig stored in the packageContext or where the orig gets
its allowedMethods from.

Apart from this is works great!


Cheers Greg

---------- Forwarded message ----------
From: Greg Huber <gregh3269@gmail.com>
Date: 21 January 2016 at 16:45
Subject: Re: [VOTE] Struts 2.5 BETA3
To: Struts Developers List <dev@struts.apache.org>


I have got it to start now (missed a dtd, so sorry!)

I now have this:

<global-allowed-methods>execute,input,cancel</global-allowed-methods>

and get

This method: cancel for action eventAdd is not allowed! - [unknown location]

<action name="eventAdd!*" method="{1}"
                class="org.events.ui.struts2.editor.EventAdd">
            <result name="input" type="tiles">.EventAdd</result>
            <result name="success" type="chain">eventEdit</result>
            <result name="cancel" type="redirectAction">
                <param name="actionName">memberEvents</param>
                <param name="pgn">${bean.pageNum}</param>
                <param name="suppressEmptyParameters">true</param>
            </result>
        </action>

checking ActionConfig:

public boolean isAllowedMethod(String method) {
        return method.equals(methodName != null ? methodName :
DEFAULT_METHOD) || allowedMethods.isAllowed(method);
    }


​I chain my actions, so I call EventAdd.getCancel() which returns "cancel"
string.

I get a calls to isAllowedMethod with :

1 methodName = {1}​ and method = execute
2 methodName = execute and method = cancel

​Only #1 has the required cancel

#2 there is only a [LiteralAllowedMethod{allowedMethod='execute'}]​

Any ideas?

Cheers Greg


On 21 January 2016 at 15:32, Greg Huber <gregh3269@gmail.com> wrote:

> I cannot seem to get the dmi to work, I get action not allowed:
>
> *This method: save for action eventAdd is not allowed! - [unknown
> location]*
>
> I then get this error when I add global-allowed-methods :
>
> <global-results>
> ......
> </global-results>
>
> <global-allowed-methods>execute,input,cancel([A-Z]*),([A-Z]*)</global-allowed-methods>
>
> which was what I had before, last time I tested beta2.
>
>
> ERROR DomHelper Element type "global-allowed-methods" must be declared. at
> (null:163:33)
>  org.xml.sax.SAXParseException; systemId:
> file:/../WEB-INF/classes/struts.xml; lineNumber: 163; columnNumber: 33;
> Element type "global-allowed-methods" must be declared.
>
> Its saying that it must be declared, with the correct line number in the
> struts.xml file.  Well it is.  Where should it go?
>
>
> btw I need all methods to pass until I can work out what I need.
>
> Cheers Greg
>
>
> On 21 January 2016 at 13:56, Lukasz Lenart <lukaszlenart@apache.org>
> wrote:
>
>> The Apache Struts 2.5 BETA3 test build is now available.
>>
>> New in BETA1
>> - XWork source was merged into Struts Core source, it means that there
>> be no more xwork artifact nor dedicated jar
>> - OGNL was upgraded to version 3.0.11 and it breaks access to
>> properties as it follows Java Bean Specification, see WW-4207 and
>> WW-3909
>> - Spring dependency for tests and spring plugin was upgraded to
>> version 4.1.6, see WW-4510.
>> - Struts2 internal logging api was marked as deprecated and was
>> replaced with new Log4j2 api as logging layer, see WW-4504.
>> - Struts2 is now build with JDK7, see WW-4503.
>> - New plugin to support bean validation is now part of the
>> distribution, see WW-4505.
>> - Deprecated plugins are now removed from the distribution and are not
>> longer supported anymore.
>> - - Dojo Plugin
>> - - Codebehind Plugin
>> - - JSF Plugin
>> - - Struts1 Plugin
>>
>> New in BETA2
>> - New security option was added - Strict Method Invocation (also known
>> as Strict DMI), see WW-4540
>> - Add support for latest stable AngularJS in Maven archetype, see WW-4522
>>
>> New in BETA3
>> - Dropped support for id and name - replaced with var, see WW-2069
>> - Dedicated archive with a minimal set of dependencies was introduced,
>> see WW-4570
>> - It is possible to use multiple names when defining a result, see WW-4590
>> - Rest plugin honors Accept header, see WW-4588
>> - New result 'JSONActionRedirectResult' in json-plugin was defined, see
>> WW-4591
>> - Tiles plugin was upgrade to the latest Tiles 3 and tiles3-plugin was
>> dropped, see WW-4584
>> - JasperReports plugins was upgraded to JasperReport 6.0, see WW-4381
>> - OGNL was upgraded to version 3.0.11 and it breaks access to
>> properties as it follows Java Bean Specification, see WW-4207 and
>> WW-3909
>> - - and then OGNL was upgraded to version 3.1.1, see WW-4561
>> - - and then OGNL was upgraded to version 3.2.1, see WW-4577
>>
>> Release notes
>> * https://cwiki.apache.org/confluence/display/WW/Version+Notes+2.5
>>
>> Distribution:
>> * https://dist.apache.org/repos/dist/dev/struts/2.5-BETA3/
>>
>> Maven 2 staging repository:
>> * https://repository.apache.org/content/repositories/staging/
>>
>> Once you have had a chance to review the test build, please respond
>> with a vote on its quality:
>>
>> [ ] Leave at test build
>> [ ] Alpha
>> [ ] Beta
>> [ ] General Availability (GA)
>>
>> Everyone who has tested the build is invited to vote. Votes by PMC
>> members are considered binding. A vote passes if there are at least
>> three binding +1s and more +1s than -1s.
>>
>> The vote will remain open for at least 72 hours, longer upon request.
>> A vote can be amended at any time to upgrade or downgrade the quality
>> of the release based on future experience. If an initial vote
>> designates the build as "Beta", the release will be submitted for
>> mirroring and announced to the user list. Once released as a public
>> beta, subsequent quality votes on a build may be held on the user
>> list.
>>
>> As always, the act of voting carries certain obligations. A binding
>> vote not only states an opinion, but means that the voter is agreeing
>> to help do the work.
>>
>>
>> Kind regards
>> --
>> Łukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message