On Thu, Jan 01, 2026 at 04:24:12PM +0100, Steinar Bang wrote: > >>>>> "Chaz Kettleson via dev" <[email protected]>: > > > Your example works fine, but would not work for loading static > > resources. My example is a bit convoluted. Probably should have done > > something like this: > > Ah! I don't use the framework to serve static resources. I serve them > myself with this servlet: > > https://github.com/steinarb/sampleapp/blob/master/sampleapp.web.frontend/src/main/java/no/priv/bang/sampleapp/web/frontend/SampleappServlet.java#L31 > > FrontendServlet is a class that serves static files from the classpath > resources of the OSGi bundle it is part of, and serves the index.html > resource booting the frontend app from a list of paths. > > https://github.com/steinarb/servlet/blob/master/servlet/servlet.frontend/src/main/java/no/priv/bang/servlet/frontend/FrontendServlet.java#L40 > > What's not in the list of paths or matches a classpath resources gets 404. > > The list of paths is generated by from the react-router paths of the > react frontend application, extracted by a vite plugin: > > https://steinar.bang.priv.no/2025/02/26/export-react-router-routes-for-use-in-java-servlet/ >
I like it. I actually stumbled across your repo when looking at shiro integration. I recently integrated pac4j for handling OIDC and I use JAX-RS Whiteboard via Aries. Currently I convert the UserProfile to my internal security object that is held in the Shiro subject. I'm looking at replacing Shiro with pac4j. -- Chaz
