struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Huber <gregh3...@gmail.com>
Subject Re: [VOTE] Struts 2.5 BETA2
Date Wed, 30 Sep 2015 06:34:04 GMT
I reverted back to beta1 struts.xml changed the dtd to 2.5, are there any
other changes needed as I am still getting

*Messages*: This method: execute for action favourites is not allowed.

I thought the DMI changes were to stop calling adhock methods not execute?

Cheers Greg.


On 29 September 2015 at 09:24, Lukasz Lenart <lukaszlenart@apache.org>
wrote:

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message