javascript - Easiest way to transfer data to frontend using JSP -


i have faced big problem. i'm using spring mvc , jsp creating static web application. unfortunatelly have use javascript , passing values model read in js function seems horrible idea. easiest way pass data jsp can use in javascript function?

you have pass data js objects. simple , powerful way. please refer http://www.w3schools.com/js/js_objects.asp

before that, expose beans jsp. e-g have mybean, spring xml changed below

<bean class="org.springframework.web.servlet.view.internalresourceviewresolver">   <property name="exposedcontextbeannames">     <list>       <value>mybean</value>     </list>   </property> </bean> 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -