How to access Spring MVC model object in javascript file?

前端 未结 8 1151
南方客
南方客 2020-12-28 19:05

I am using spring 3 MVC and i have below classes.

External system would call my application using below URL:

http://somehost/root/param1/param2/param         


        
8条回答
  •  抹茶落季
    2020-12-28 19:29

    You can't access java objects from JavaScript because there are no objects on client side. It only receives plain HTML page (hidden fields can help but it's not very good approach).

    I suggest you to use ajax and @ResponseBody.

提交回复
热议问题