(Guessing) Try making your "allow" more regexp friendly:
http://jakarta.apache.org/regexp/apidocs/org/apache/regexp/RE.html

OLD: allow="*.ubis.local,*.ubis-ag.com"
NEW: allow="^.+\.ubis\.local$,^.+\.ubis\-ag\.com$"

-Tim

Fruechtenicht, Torben wrote:
Hi,

I want to protect the manager and the admin webapps in my Tomcat installation from 
requests originating outside my company - and setting a RemoteHostValve for the 
manager and the admin context seems the way to go.
Therefore I've changed my server.xml file, changing the context entry for the admin 
webapp (manager will be next) to look like this:

<Context className="org.apache.catalina.core.StandardContext" crossContext="false" reloadable="false" mapperClass="org.apache.catalina.core.StandardContextMapper" useNaming="true" debug="0" swallowOutput="false" privileged="true" displayName="Tomcat Administration Application" wrapperClass="org.apache.catalina.core.StandardWrapper" docBase="d:/jakarta-tomcat-4.1.24/server/webapps/admin" cookies="true" path="/admin" cachingAllowed="true" charsetMapperClass="org.apache.catalina.util.CharsetMapper">
<Logger className="org.apache.catalina.logger.FileLogger" debug="0" verbosity="1" prefix="localhost_admin_log." directory="logs" timestamp="true" suffix=".txt"/>
<Valve className="org.apache.catalina.valves.RemoteHostValve" allow="*.ubis.local,*.ubis-ag.com"/>
</Context>


Looks pretty straightforward to me, the documentation does not say a look about this 
type of valve, but from what it says, my valve should be okay.
However, starting Tomcat gives me an error message:

09.07.2003 14:36:00 org.apache.commons.digester.Digester startElement
SCHWERWIEGEND: Begin event threw exception
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at 
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789)
        at 
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684)
        at 
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713)
        at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019)
        at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
        at 
org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:259)
        at org.apache.commons.digester.Rule.begin(Rule.java:200)
        at org.apache.commons.digester.Digester.startElement(Digester.java:1268)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
        at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown 
Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.commons.digester.Digester.parse(Digester.java:1527)
        at org.apache.catalina.startup.CatalinaService.load(CatalinaService.java:187)
        at org.apache.catalina.startup.CatalinaService.load(CatalinaService.java:258)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.BootstrapService.init(BootstrapService.java:231)
        at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:297)
Caused by: java.lang.IllegalArgumentException: Syntax error in request filter pattern 
*.ubis.local
        at 
org.apache.catalina.valves.RequestFilterValve.precalculate(RequestFilterValve.java:279)
        at 
org.apache.catalina.valves.RequestFilterValve.setAllow(RequestFilterValve.java:186)
        ... 30 more

Am I missing something? Some other files, etc. to check? Any help is appreciated.

Torben

---
Torben Fruechtenicht
Developer
IT Solutions

UBIS AG fon: +49 30 39929-731
Dircksenstraße 42-44 fax: +49 30 39929-900
D-10178 Berlin email: [EMAIL PROTECTED]
Germany web: http://www.ubis-ag.com
---


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to