ocpsoft/rewrite ? reverse-engineered prompt

Reverse engineered prompt

Build me a Java URL rewriting library for servlet based web apps, something I can drop into an existing site to forward, redirect, and clean up URLs without much fuss.

I want it to work with Java EE and older servlet apps, and make it easy to define rewrite rules in code, like matching a path and forwarding it to a new page. Please include a simple way to register the configuration, either with an annotation or a service file, and make sure it can plug into common frameworks like CDI, Spring, JSF, JSP, and plain servlets.

It would be great if you also include a small demo or showcase app, plus tests, so I can see how it’s supposed to be used. If you need to check current docs or best practices while implementing it, go ahead and look them up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab