I am trying to pass clusterId=1
as parameter from
<a href="http://192.168.11.134:8080/UniconnectConfigurationWeb/nodes?clusterId=1">
and get it into spring mvc controller through @PathParam("clusterId")Integer clusterId
. But I'm getting 404 error.
Guide me how to pass parameter through anchor tag and how to hit controller and get the parameter value. I am sharing my code below,
@RequestMapping(value = "/nodes?clusterId={clusterId}", method = RequestMethod.GET)
public ModelAndView nodes(@RequestParam("clusterId")Integer clusterId,HttpSession session, HttpServletRequest request) {
System.out.println(clusterId);
return dashboard;
}
}
<c:url var="myURL" value="http://192.168.11.134:8080/UniconnectConfigurationWeb/nodes">
<c:param name="clusterId" value="1"/>
</c:url>