case insensitive mapping for Spring MVC @RequestMapping annotations

Posted by Zahid Riaz on Stack Overflow See other posts from Stack Overflow or by Zahid Riaz
Published on 2012-10-02T03:35:01Z Indexed on 2012/10/02 3:37 UTC
Read the original article Hit count: 260

Filed under:
|
|

I have Controller having multiple @RequestMapping annotations in it.

@Controller
public class SignUpController {

 @RequestMapping("signup")
 public String showSignUp() throws Exception {
    return "somejsp";
 }

 @RequestMapping("fullSignup")
 public String showFullSignUp() throws Exception {
    return "anotherjsp";
 }

 @RequestMapping("signup/createAccount")
 public String createAccount() throws Exception {
    return "anyjsp";
 }
}

How can I map these @RequestMapping to case insensitive. i.e. if I use "/fullsignup" or "/fullSignup" I should get "anotherjsp". But this is not happening right now. Only "/fullSignup" is working fine.

© Stack Overflow or respective owner

Related posts about java

Related posts about web-applications