On 08/10/2021 11:43, Me Self wrote:
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".
https://github.com/apache/tomcat/tree/main/test/org/apache/catalina/valves Mark --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
