java - Is it possible to get Javascript array in JSP page -



java - Is it possible to get Javascript array in JSP page -

i developing web application in which have javascript array , want array in jsp page , iterate save info in database.

var value = response; (var key in value) { if (value.hasownproperty(key)) { alert(key + " -> " + value[key]); var sample = new array(); sample=value[key]; console.log(sample); // document.getelementbyid(''); } } });

i want info on jsp page possible. if possible, how?

you can have javascript in jsp execute on client side. if want save stuff on trigger of event within browser can making ajax phone call or form submission. ajax preferred way because faster , improve experience user

but if have intention of execution of javascript on server side thats not possible

java javascript jsp

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -