Questions tagged [tomcat-valve]

A Valve is a type of component that can be inserted into Tomcat's request/response pipeline in order to add application-specific logic.

A Valve is a type of component that can be inserted into Tomcat's request/response pipeline in order to add application-specific logic in relation to request processing.

There are many kinds of valves dealing with different aspects of the server's operation and functionality, some of which include:

  • Logging
  • Authentication
  • SSL
  • Single Sign On
  • stuck thread detection

For more information, visit the Apache Tomcat documentation

76 questions
9
votes
2 answers

Restrict access to Tomcat manager by IP

I'm trying to restrict all the requests to my Tomcat manager which don't come from my IP. So far, I found that adding a Valve to the server.xml like this: will block all…
muilpp
  • 1,293
  • 4
  • 17
  • 36
6
votes
1 answer

Custom Tomcat Valve contained in web app WAR file

I'm looking to implement a custom Valve and configuring it using META-INF/context.xml. At the moment though, when context.xml is parsed during deployment, Tomcat (6.0.32) dies with a ClassNotFoundException on my custom Valve implementation. I'm…
Dave G
  • 9,639
  • 36
  • 41
5
votes
2 answers

Custom Tomcat Valve Configuration

I wrote a custom Tomcat valve. (I'm using Tomcat 6.0.24 and Java 1.6) Here's the XML element where I declare my valve: When I put this declaration inside server.xml's Host element. Tomcat calls the…
user449065
  • 51
  • 1
  • 3
5
votes
3 answers

Tomcat access logging through log4j?

I have a clean tomcat7 installation with log4j enabled (according to http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j). "Application-level" logging do use log4j configuration (I direct logs to local syslog server). How can I make my…
pzn
  • 141
  • 1
  • 7
5
votes
3 answers

How to configure Tomcat AccessLogValve to hide passwords?

Is it possible to configure AccessLogValve to hide/replace passwords before they are written to the log file? I am not familiar with valves, perhaps there is a way to insert a custom filter/valve?
Reuben Peter-Paul
  • 1,550
  • 3
  • 15
  • 25
5
votes
1 answer

How to add Valve to Apache Tomcat

I wrote a Valve for Apache Tomcat by extending org.apache.catalina.valves.ValveBase class and implementing inovoke() method. Now I want to add it to my Tomcat for execution? Please show me the steps.
andunslg
  • 781
  • 14
  • 38
4
votes
0 answers

embedded tomcat valve spring boot

I'm trying to configure the LogbackValve for getting access logs in case my Spring Boot based web application is running from embedded Tomcat. Following is the code for configuration: import javax.servlet.Servlet; import…
4
votes
1 answer

Can I use a Tomcat Valve with Jetty?

Is it possible to use a Valve for Tomcat also together with Jetty? If yes how can I set it up with jetty.xml and/or embedded?
Horcrux7
  • 23,758
  • 21
  • 98
  • 156
4
votes
2 answers

Apache Tomcat - Two factor authentication

I am trying to integrate a two factor authentication solution with a mail server that is hosted on Apache Tomcat. Right now the app is using form based authentication and the user enters his user name and password and is authenticated against…
user1826116
  • 405
  • 1
  • 5
  • 15
4
votes
2 answers

Trying to get request parameter out to access log in tomcat

I trying to investigate how often a particular HTTP request is getting send to a web site. The request is a POST and has a parameter named "_method". I can see this in firebug getting net over. I need to check the value of this "_method" parameter,…
dublintech
  • 16,815
  • 29
  • 84
  • 115
3
votes
1 answer

org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored

Using Tomcat server 8.5.4 as a standalone service (tomcat8w.exe), I get the below error in 'logs/tomcat8-stderr.YYYY-MM-DD.txt' when I stop the server : org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request,…
Etienne Tonnelier
  • 2,119
  • 1
  • 15
  • 14
3
votes
1 answer

Re-writing tomcat 8 urls

I have two tomcat applications deployed under two different contexts: someurl.com/context1/ someurl.com/context2/ I need to intercept urls in the form: someurl.com/clientname/context1/ and redirect them to…
Radi Radichev
  • 562
  • 6
  • 13
3
votes
1 answer

Multiple Tomcat Authenticator Valves

Is it possible to have multiple authenticator Valves within the same Tomcat context configuration? I know you can have multiple Realms through the CombinedRealm, but what about different authentication methods? I have to update a web application so…
Michael Dandini
  • 313
  • 1
  • 8
2
votes
2 answers

Application-specific accesslog in tomcat?

I am trying to configure independent accesslogs for my .war application in tomcat, but I can't figure out what is failing. The intention is to have separate access logging for requests going to my application, without having to rely on tomcat's…
André Fernandes
  • 2,335
  • 3
  • 25
  • 33
2
votes
3 answers

Implementing Tomcat Custom Valve

I am trying to implement a custom valve in Tomcat, say MyValve which extends BaseValve. I created a jar of the project and added it into the Tomcat\lib folder. The next step is of configuring the server.xml or context.xml. I tried both. But my valve…
ajax
  • 317
  • 8
  • 17
1
2 3 4 5 6