0 Replies Latest reply on Jan 26, 2011 3:12 AM by endy

    Updating RewriteValve mbean configuration attribute via twiddle

    endy

      Heya

       

      i'm attempting to update the configuration attribute for the valve in question via twiddle. I can access the bean just fine, and update the config, but it doesn't parse the input correctly, or then I'm not giving the input in the right format.

       

      I wrote a small class that reads the rewrite.proparties file and execs the update via Runtime as follows:

       

      c:\\opt\\jboss-dev\\bin\\twiddle.bat -s localhost:1199 set jboss.web:type=Valve,name=RewriteValve,path=/mycontext,host=localhost configuration "config goes here"

       

      Now no matter how I enter the config, it just read the first RewriteRule. And it doesn't even do that completely. My rewrite.properties is as follows:

      RewriteRule ^/forum/$ /forum/index.jsp [L]
      RewriteRule ^/forum/([a-zA-Z_]+)/$ /forum/forum.jsp?forum=$1 [L]

      After I run twiddle, the config is set to "RewriteRule ^/forum/$ /forum/index.jsp" (i.e., the [L] is missing, along with the second line). I've tried with spaces, with "\r\n", without, having all on one line, etc. No luck. Looking at the source for RewriteValve the setConfiguration() calls parse() method that uses BufferedReader and reads the given configuration string line by line, so it should work ...

      Using Jboss 5.0.1GA, WinXP

       

      helb ? Thanks !