I am new with Spring mvc. I need to pass an javascript variable to controller. How to achieve this??
Form tag solution is not appropriate in case of my application.
I need to pass this start variable of JS to my controller.In some cases this variable can be null or not available as per requirements.
Please suggest asap!!!
My JS code is:
function clickPaginate(start){
var X = '<%=url%>';
window.location.href=X+'/library/${publisher}';
}
and controller is:
@RequestMapping(value = "/library/{publisher}", method = RequestMethod.GET)
public String getPublisherDetails(@PathVariable("publisher") String publisher, ModelMap model) throws FeedsException {
}