struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: [VOTE] Struts 2.5 BETA2
Date Tue, 29 Sep 2015 08:12:44 GMT
2015-09-29 9:47 GMT+02:00 Greg Huber <gregh3269@gmail.com>:
> sorry, following https://github.com/apache/struts/pull/47
>
> if I add to my extended package :
>
> <package name="events-member" namespace="/member" extends="events">
>
>
> <global-allowed-methods>execute,input,back,cancel,browse</global-allowed-methods>
>
>   .....
>
> </package>
>
> I get:
>
> Messages:
> This method: execute for action favourites is not allowed!
> Stacktraces
> This method: execute for action favourites is not allowed! - [unknown
> location]
>
> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:200)
>
> org.apache.struts2.factory.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
>
> org.apache.struts2.factory.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)
>
> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
>
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:543)
>
> org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81)
>
>
>
> ....if I add it to my default package
>
> <!-- Default package -->
> <package name="events" namespace="/" extends="struts-default">
>
> <global-allowed-methods>execute,input,back,cancel,browse</global-allowed-methods>
>   ...
> </default>
>
> There is a dom exception
>
> ERROR DomHelper The content of element type "package" must match
> "(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global-results?,global-allowed-methods?,global-exception-mappings?,action*)".
> at (null:381:15) org.xml.sax.SAXParseException; systemId:
> file:Events/src/main/webapp/WEB-INF/classes/struts.xml; lineNumber: 381;
> columnNumber: 15; The content of element type "package" must match
> "(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global-results?,global-allowed-methods?,global-exception-mappings?,action*)".
>
> Not sure where it goes?
>
> ....I need to allow all methods until I have time to go through and add
> each one to my actions.

Did you upgrade DTD definition?

<!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
        "http://struts.apache.org/dtds/struts-2.5.dtd">


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
View raw message