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:24:48 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]

No idea what's wrong here.... "events" package extends "struts-default"?

> ....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?

You put this in wrong place, it must be after "global-results" but
before "global-mappings" and "action" tags. Also you don't have to
define "global-allowed-methods" as they are already defined in
struts-default. If you want to extend them, then you must redefine
them in your package.


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