Is there any easy way to provide a case-insensitive URLs in a JAX-RS web service? The goal of this is to produce a web service which is a "lenient acceptor."1
I imagine it's possible to do this with a filter which .to[Lower|Upper]Case()
s all incoming URLs. Unfortunately, this implementation demands programmer discipline/consistency in making sure that all hard-coded URL strings in the application are strictly [lower|upper]case.
Also, I don't yet know the JAX-RS analog to a servlet filter.
If it matters, I'm using Jersey as my JAX-RS implementation.
1As in, "be lenient in what you accept, and strict in what you produce" (can't recall the source)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…