Hi,

On Mon, Mar 23, 2020 at 7:08 PM Arnaud Yahoo <a_mer...@yahoo.fr.invalid>
wrote:

> Hello
>
> I am trying to invoke a mbean through jmxproxy servlet. Arguments are
> separated with , so when one argument itself is containing a coma, it
> breaks the invocation.
>
> It seems there is no way to escape ,.
>
> For example trying to save a context configuration fails :
>
> curl -u user:pass -G "http://localhost:8080/manager/jmxproxy/";
> --data-urlencode "invoke=Catalina:type=StoreConfig" --data-urlencode
> "op=storeContext" --data-urlencode
> "ps=Catalina:j2eeType=WebModule,name=//localhost/myContext,J2EEApplication=none,J2EEServer=none,true,true"
>
>

https://github.com/apache/tomcat/blob/b9aff64f78740235a5565004423be40cadc740ac/java/org/apache/catalina/manager/JMXProxyServlet.java#L240
splits
the parameters by comma and in your case it finds 5 parameters, while
StoreConfig#storeContext(String, boolean, boolean) expects 3 parameters.
Without improvements in the parsing code I think your case is not supported
at the moment.

Martin


>
> of course it works from jconsole.
>
> (By the way as an alternative I tried
>
> curl -u user:pass
> http://localhost:8080/manager/text/save?path=/myContext but it fails with
>
> FAIL - Encountered exception [javax.management.MBeanException: Cannot
> find operation store] )
>
> Arnaud
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to