When it has just one parameter.

@RequestMapping(value = "/.../{userId}", method=RequestMethod.GET)
public ModelAndView myprofilePage(..., @PathVariable String userId) {
	...
	return mv;
}

When it has more than one parameter.

@RequestMapping(value = "/.../{userId}/{pageNum}", method=RequestMethod.GET)
public ModelAndView myprofilePage(..., @PathVariable String userId, @PathVariable long pageNum) {
	...
	return mv;
}