I would like to test a custom tomcat valve with tomcat-embed and junit. Is
that possible?

Found a few tomcat-embed samples on the web but most seem to only deal with
setting up a webapp - something along the lines:

@BeforeAll
public static void setup() throws LifecycleException {
  Tomcat tomcat = new Tomcat();
  tomcat.setPort(...);
  StandardContext ctx = (StandardContext) tomcat.addWebapp("/", new
File("src/main/webapp/").getAbsolutePath());

What would I need to do to add a valve? And btw. it's a maven project so
the valve is compiled to "target/classes".

Reply via email to