0 Replies Latest reply on Jun 1, 2012 11:27 AM by Carlos Oliva

    Regex expression in context.xml

    Carlos Oliva Novice

      How should one escape the expression \d{1,3} in a context.xml file for limiting access to a context?  I am thinking that I should escape more than one character in the expression, or I am missing something from the example in https://community.jboss.org/wiki/LimitAccessToCertainClients.  The expression seems to fail whether I escape the \d or not; the expression .* works fine.  I add a context.xml file to the WEB-INF folder and insert the tomcat valve as described.  Whenever I add the expression <some number>\.\d{1,3}\.\d{1,3}\.\d{1,3} to an accept attribute, JBoss rejects all requests.  The same happens with \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}.