Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Javascript needs Object in request/StrutsForm  RSS feed

 
Alejandro Ross
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,
Upon entering a page, I set a columns Object into a Struts Form (corresponding to the page). I could have also put it in the request.
I want to access the columns object throught Javascript.

Is it possible?

Thanks in advance,
Alex
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, Java objects exist on the server, Javascript on the client.

This article might be helpful.

The best you can do is to use the server-side templating JSP to construct Javascript objects that contain the data you need, or to communicate back to the server via Ajax.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!