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
0
votes
1 answer

How to configure jboss rewrite valve settings

I am developing a web app. using struts2 and jboss url rewrite valve as you see from the title. What i want to know is which are the neccessary jboss configuration files to configure rewrite valve settings? Besides, I couldn't find any information…
javatar
  • 4,542
  • 14
  • 50
  • 67
0
votes
1 answer

Using Tomcat's Rewrite Valve

I am trying to use Tomcat's rewrite valve to rewrite a URL to not show the actually WebApp name. The current URL looks like http://example.com/Thingstuff. I would still like the URL to point to the Thingstuff app, but I would like users to see…
0
votes
2 answers

jboss valve encoding problem while url rewriting

I have an app., coded with ejb3, jsf and maven, which runs on jboss 4.2.2GA The problem I have been facing for 2 days is I cannot convert non-english characters that are added to url on runtime. For instance, there is a search textbox and a button.…
javatar
  • 4,542
  • 14
  • 50
  • 67
0
votes
0 answers

Where can I find the Apache httpd server IP from within a Tomcat Valve, when AJP was used?

I am working on updating a Tomcat Valve. I want to add a check to see if the caller is coming from localhost/127.0.0.1, which is the case if Apache httpd acts as the frontend webserver on the same machine. So I added a check for the IP address…
PaulRailo
  • 11
  • 2
0
votes
1 answer

tomcat 7 jdbc access log valve not working

Hi I am trying to use db for access logging in my tomcat application. I followed tomcat documentation. https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/valves/JDBCAccessLogValve.html The server seems to boot up fine but I don't see…
amrk7
  • 1,194
  • 5
  • 13
  • 33
0
votes
1 answer

Redirect POST request using tomcat valve

I need to redirect https://ipaddress/index.jsp to https://ipaddress/v1/index.jsp Tomcat Version : 7.0.32 I have a valve configured in server.xml Here I have a class that…
user3733071
  • 31
  • 1
  • 4
0
votes
1 answer

Tomcat Valve - java.lang.NoSuchMethodError

Tomcat 6.0.36 I am getting a java.lang.NoSuchMethodError when starting my tomcat. I have this in my server.xml :
klind
  • 855
  • 2
  • 21
  • 33
0
votes
1 answer

JBoss AS7 @Inject bean into valve

Is it possible to @Inject a stateless session bean into a subclass of AuthenticatorBase? I'm using JBoss as 7.1.1. My code looks like this: ... public class myValve extends AuthenticatorBase { @Inject AuthController controller; //some code…
Johannes
  • 13
  • 2
0
votes
1 answer

How to modify Tomcat's response header with valves?

I need to minimize Tomcat's response header. The device sending requests to tomcat is very limited in memory, so I want to remove the headers Date, Server and Content-Type. I set up my own valve with an action hook. The hook gets called, but it…
Kapper
  • 1
  • 1
0
votes
1 answer

Deny IP access to an inside Tomcat directory

I'm trying to solve the following: I have a Tomcat web application which is configured (and should be) to accept ANY IP. e.g: (protocol://host:port/MyApp/) What I want to do is to only allow certain IP's to enter a directory stored inside my web…
0
votes
1 answer

Using environment variable for accesslogvalve dir

I want to populate "dir" in accesslogvalve from a value from setenv.bat. Ex:
d k
  • 3
  • 2
0
votes
2 answers

tomcat forward valve

I need the following serverside redirect or forward on a Tomcat server: the url http://portal.customer_name needs to be renamed/redirected to http://portal.customer_name/customer_name. So in short, an url without context path to be redirected to the…
Berend
  • 128
  • 1
  • 8
0
votes
1 answer

Can we engage a Valve specifically for a Tomcat Web App

I have some web apps hosted in Tomcat container, Can we engage a Valve specifically for a webapp ? Please give me a way.
andunslg
  • 781
  • 14
  • 38
0
votes
2 answers

What is the way to extract a SOAP message received using a Tomcat Valve

I am trying to create a custom Valve for Apache Tomcat by extending the org.apache.catalina.valves.ValveBase class. It has the method public abstract void invoke(Request request,Response response). In my Tomcat, container I have Axis2 and it has a…
andunslg
  • 781
  • 14
  • 38
0
votes
1 answer

How to get value from a map stored on a httpsession when running on Tomcat

With Tomcat, it is possible to dump a pile of interesting information to the a logfile by configuring the appropriate valve. For example:
dublintech
  • 16,815
  • 29
  • 84
  • 115