tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <mgai...@hotmail.com>
Subject Re: Cannot protect with Valve Tomcat 5.5.17 Manager Application ( WindowsEnvironment - JRE 5.0)
Date Tue, 25 Jul 2006 15:31:25 GMT
Goddag Alain-

In your doGet doPost or service methods you can interrogate the IP of the invoking CLIENT
via the HttpServletRequest with
HttpServletRequest.getRemoteAddr()

Bedankt,
Martin --
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: <Alain.Vandermeersch@euroclear.com>
To: <users@tomcat.apache.org>
Sent: Tuesday, July 25, 2006 11:02 AM
Subject: Cannot protect with Valve Tomcat 5.5.17 Manager Application ( WindowsEnvironment
- JRE 5.0)


>I am trying to use the Tomcat facility ( on Windows Server) that restricts 
> 
> Web Access to an ip address - in our case I want the Tomcat Manager 
> application to be available
> only from a Web Browser on the Tomcat server itself.
> 
> I have updated the file Program Files\Apache Software Foundation\Tomcat 
> 5.5\server\webapps\manager 
> 
> <Context docBase="${catalina.home}/server/webapps/manager"
>         privileged="true" antiResourceLocking="false" 
> antiJARLocking="false">
> 
>  <!-- Link to the user database we will get roles from -->
>  <ResourceLink name="users" global="UserDatabase"
>                type="org.apache.catalina.UserDatabase"/>
>  <Valve className="org.apache.catalina.valves.remoteAddrValve" 
> allow="127.0.0.1"/>
> 
> </Context>
> 
> However it does not have any effect. I can still remotely access the 
> Manager application
> 
> When I try to move( as documented by Tomcat) the Context definition into 
> the Program Files\Apache Software Foundation\Tomcat 5.5\conf\server.xml 
> definition, I get a ClassNotFound java exception for
> org.apache.catalina.valves.remoteAddrValve in the bootstrap process  - I 
> checked the class is located in  Program Files\Apache Software 
> Foundation\Tomcat 5.5\server\lib\catalina-optional.jar.
> Because its the bootstrap process I guess the Classloader process may not 
> be initialized fully. I tried to add the Jar file in the Windows CLASSPATH 
> 
> variable without success.
> 
> Many thks for anybody's help !
> 
> Attached the logged error when context with valve is added to the 
> server.xml file
> 
> INFO: Server startup in 0 ms
> Jul 25, 2006 2:39:38 PM org.apache.tomcat.util.digester.Digester 
> startElement
> SEVERE: Begin event threw exception
> java.lang.ClassNotFoundException: 
> org.apache.catalina.valves.remoteAddrValve
>        at java.net.URLClassLoader$1.run(Unknown Source)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(Unknown Source)
>        at java.lang.ClassLoader.loadClass(Unknown Source)
>        at java.lang.ClassLoader.loadClass(Unknown Source)
>        at 
> org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:204)
>        at org.apache.tomcat.util.digester.Rule.begin(Rule.java:152)
>        at 
> org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1275)
>        at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown 
> 
> Source)
>        at 
> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown

> 
> Source)
>        at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown

> 
> Source)
>        at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown

> 
> Source)
>        at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown

> 
> Source)
>        at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
> 
> Source)
>        at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
> 
> Source)
>        at 
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
>        at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
> 
> Source)
>        at 
> org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
>        at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
>        at org.apache.catalina.startup.Catalina.load(Catalina.java:523)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
> Jul 25, 2006 2:39:38 PM org.apache.catalina.startup.Catalina load
> WARNING: Catalina.start using conf/server.xml: 
> java.lang.ClassNotFoundException: 
> org.apache.catalina.valves.remoteAddrValve
>        at 
> org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2725)
>        at 
> org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2751)
>        at 
> org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1278)
>        at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown 
> 
> Source)
>        at 
> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown

> 
> Source)
>        at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown

> 
> Source)
>        at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown

> 
> Source)
>        at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown

> 
> Source)
>        at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
> 
> Source)
>        at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
> 
> Source)
>        at 
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
>        at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
> 
> Source)
>        at 
> org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
>        at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
>        at org.apache.catalina.startup.Catalina.load(Catalina.java:523)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
> Jul 25, 2006 2:39:38 PM org.apache.tomcat.util.digester.Digester 
> startElement
> SEVERE: Begin event threw exception
> java.lang.ClassNotFoundException: 
> org.apache.catalina.valves.remoteAddrValve
> ....
Mime
View raw message