I have a String variable, containing XML. I added it to my model with modelAndView.addObject(…). Now, how can I access this object in Javascript ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Let’s say that in your controller you did something like
modelAndView.addObject("someValue", someValue).In your JSP, you can do this :
And then you can use this variable in your JS.