[jboss-user] [Beginner's Corner] - Regex expression in context.xml

Carlos Oliva do-not-reply at jboss.com
Fri Jun 1 11:27:06 EDT 2012


Carlos Oliva [https://community.jboss.org/people/ramboid] created the discussion

"Regex expression in context.xml"

To view the discussion, visit: https://community.jboss.org/message/739360#739360

--------------------------------------------------------------
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/docs/DOC-11257 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}.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/739360#739360]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120601/33def8f6/attachment.html 


More information about the jboss-user mailing list