Replacing spaces with underscores is possible, but the other way around wont work, because you cannot distinguish whether an underscore is a space or a just an underscore.
With 3.3.0 you could implement a custom rewrite processor for something like this. See the documentation for details.
In 4.0.0-SNAPSHOT we support custom JSF converters you can attach to individual path and query parameters. Here you cans simply implement a JSF converter that converts the string to the “url representation” and the other way around.
Do you play Magic?
Get TopDecked MTG, the #1 Magic App, built by players, for players. Free to use, forever.