Yes, that worked. Thanks a lot.
But who put those examples in the Tomcat documentation 
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html) using the same 
syntax I used for my valve? Oh well, never trust the documentation...

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
--- 

> -----Ursprüngliche Nachricht-----
> Von: Tim Funk [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 9. Juli 2003 15:04
> An: Tomcat Users List
> Betreff: Re: Setting a RemoteHostValve for a context
> 
> 
> (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(NativeMethodAccess
> orImpl.java:39)
> >     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
> >     at java.lang.reflect.Method.invoke(Method.java:324)
> >     at 
> org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(P
> ropertyUtils.java:1789)
> >     at 
> org.apache.commons.beanutils.PropertyUtils.setNestedProperty(P
> ropertyUtils.java:1684)
> >     at 
> org.apache.commons.beanutils.PropertyUtils.setProperty(Propert
> yUtils.java:1713)
> >     at 
> org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.j
> ava:1019)
> >     at 
> org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
> >     at 
> org.apache.commons.digester.SetPropertiesRule.begin(SetPropert
> iesRule.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(Unkno
> wn Source)
> >     at 
> org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyEleme
> nt(Unknown Source)
> >     at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStar
> tElement(Unknown Source)
> >     at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragment
> ContentDispatcher.dispatch(Unknown Source)
> >     at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocu
> ment(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(CatalinaServi
> ce.java:187)
> >     at 
> org.apache.catalina.startup.CatalinaService.load(CatalinaServi
> ce.java:258)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.java:39)
> >     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
> >     at java.lang.reflect.Method.invoke(Method.java:324)
> >     at 
> org.apache.catalina.startup.BootstrapService.init(BootstrapSer
> vice.java:231)
> >     at 
> org.apache.catalina.startup.BootstrapService.main(BootstrapSer
> vice.java:297)
> > Caused by: java.lang.IllegalArgumentException: Syntax error 
> in request filter pattern *.ubis.local
> >     at 
> org.apache.catalina.valves.RequestFilterValve.precalculate(Req
> uestFilterValve.java:279)
> >     at 
> org.apache.catalina.valves.RequestFilterValve.setAllow(Request
> FilterValve.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]
> 
> 

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

Reply via email to