arjantijms commented on pull request #399: URL: https://github.com/apache/tomcat/pull/399#issuecomment-752072520
I'll investigate the application specific Valve. Can META-INF/context.xml exist on the class path as well, or does it have to be inside [war root]/META-INF? > Use reflection as several other integrators I'm now using reflection indeed: ```java private static Subject getSubject(HttpServletRequest httpServletRequest) { return (Subject) getRequest(httpServletRequest).getNote(REQ_JASPIC_SUBJECT_NOTE); } private static Request getRequest(HttpServletRequest servletRequest) { return getRequest((RequestFacade) servletRequest); } private static Request getRequest(RequestFacade facade) { try { Field requestField = RequestFacade.class.getDeclaredField("request"); requestField.setAccessible(true); return (Request) requestField.get(facade); } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { throw new IllegalStateException(e); } } ``` @markt-asf I'm working on a standalone implementation of Jakarta Authorization (JACC), and so far it works really well on Tomcat (and Piranha). It's actually interesting to see how the JACC way to match URL patterns and the Tomcat native way are really not that different. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org