Map both “/abc” and “/abc/*” to Spring MVC’s dispatcher servlet

On web.xml

	
	
		bo-portal
		org.springframework.web.servlet.DispatcherServlet
		1
	
	
		bo-portal
		/boportal/*
		/boportal			
		
	
	@RequestMapping(value = "/")
	public String homepage(ModelMap model) {
		return "/some/page";
	}

	@RequestMapping(value = "/boportal")
	public String homepageWithoutSlash(ModelMap model) {
		return homepage(model);
	}	

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.