tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From LERBSCHER Jean-Pierre <jean-pierre.lerbsc...@cofiroute.fr>
Subject RE : Restrict access to webapps for IPs
Date Wed, 11 May 2005 07:53:35 GMT
See
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html#Automatic
Application Deployment

" When using automatic deployment, the docBase defined by an XML Context
file should be outside of the appBase directory. If this is not the case
difficulties may be experienced deploying the web application or the
application may be deployed twice.
"

-----Message d'origine-----
De : Altrock, Jens [mailto:Jens.Altrock@STADT-NW.DE] 
Envoyé : mercredi 11 mai 2005 09:01
À : 'Tomcat Users List'
Objet : AW: Restrict access to webapps for IPs

> -----Ursprüngliche Nachricht-----
> Von: Lutz Zetzsche [mailto:Lutz.Zetzsche@sea-rescue.de]
> Gesendet: Mittwoch, 11. Mai 2005 08:50
> An: Tomcat Users List
> Betreff: Re: Restrict access to webapps for IPs
> 
> 
> Hi Jens,
> 
> Am Mittwoch, 11. Mai 2005 08:17 schrieb Altrock, Jens:
> > Ok tried it again.. first some more information:
> > I am using Tomcat 5.0.28 on Redhat Fedora Core 3, installed in
> > /usr/local/tomcat
> >
> > I created a XML file called <application>.xml in
> > /usr/local/tomcat/conf/Catalina/localhost
> > where <application> is the name of the webapp. That worked so far.
> > The file consisted just of a few lines:
> >
> > <Context path="/NetAdmin" 
> docBase="${catalina.home}/webapps/NetAdmin"
> >         debug="0" privileged="true">
> >   <Valve className="org.apache.catalina.valves.RemoteAddrValve"
> > allow="192.100.46.*,172.16.*.*,194.25.29.*,127.0.0.1"/>
> > </Context>
> >
> > I have to mention that I did neither write that app nor know much
> > about it anyway.. it uses a JDBC connection
> > to a mysql database to write data to that db. But after 
> creating that
> > config file mentioned above, the
> > JDBC driver didn't work anymore...
> >
> > Anyone can help me with that?
> 
> It looks like your new Context definition is overriding an existing 
> Context definition for this web application which contains 
> the resource 
> definition for the MySQL database.
> 
> So you should have a look at your $CATALINA_HOME/conf/server.xml if 
> there might be a existing Context definition inside the related Host 
> element.
>

I looked at the $CATALINA_HOME/conf/server.xml file, but can't find anything
like that inside the HOST element. It's the standard server.xml file though,
I don't know in what way a servlet itself can change that file; but I don't 
think it can.
 
> You should also look for a context.xml in the 
> $CATALINA_HOME/webapps/[webapp]/META-INF/ directory for the same 
> reason.
> 

I did, but there is none, and there never was one. That's what I thought
first,
but there's just a MANIFEST.MF file inside.

> If you will find an existing Context definition, then insert 
> your valve 
> filter there and delete you newly created <application>.xml.
> 
> 
> Best wishes
> 
> Lutz
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

I attached the server.xml and the application's xml file to the mail though.

Regards,

Jens

###########################################
Diese Nachricht wurde von F-Secure Anti-Virus gescannt.

This message has been scanned by F-Secure Anti-Virus.




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message