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 BETA3
Date Thu, 21 Jan 2016 16:55:00 GMT
2016-01-21 16:32 GMT+01:00 Greg Huber <gregh3269@gmail.com>:
> 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>

To use RegEx you must prefix them with "regex:", like this:

<global-allowed-methods>execute,input,regex:cancel([A-Z]*),regex:([A-Z]*)</global-allowed-methods>

https://cwiki.apache.org/confluence/display/WW/Action+Configuration#ActionConfiguration-StrictMethodInvocation

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

Do you use proper DTD? It must be next after <global-results>..</global-results>

  <!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