That do you mean with “generate URLs”? What’s the exact use case? The typical way to generate pretty URLs from non-pretty URLs is to use HttpServletResponse.encodeURL(), but this won’t be possible from outside of a request.
Do you play Magic?
Get TopDecked MTG, the #1 Magic App, built by players, for players. Free to use, forever.