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 ?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Is there a limit to how many levels you can nest i
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- How to toggle on Order in ReactJS
Assuming you want to access Model attribute
Using
<c:set>
likeand then you can use this var in js using
${myData}
.For example in jQuery selector
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.