I have worked servlet that need to convert to Spring MVC controller to have access spring beans etc. Why in normal servlet request.getPathInfo() return not null, but in Spring Controller i get null value ? I know i can use @PathVariable, but wonder why the results of this method is the difference?

@RequestMapping(value = {"/test", "/test/*"})
public void test(HttpServletRequest req, HttpServletResponse res) {

    log.info(req.getPathInfo() == null); // true!

    if (req.getMethod().equalsIgnoreCase("get")) {
        // analogue to doGet...
    } else {
        // analogue to doPost...
    }

}
Edit
Report