Issue
I'm adding an object to my ModelAndView
in spring and forwarding to my jsp view. I need to access that object in my jquery. Is this possible without first putting the value in a hidden field? How is it done?
Solution
<script type="text/javascript">
var modelAttributeValue = '${modelAttribute}';
</script>
This will resolve the model attribute added by model.addAttribute("modelAttribute", value)
Answered By - Bozho
Answer Checked By - Pedro (JavaFixing Volunteer)