It's not a secret anymore!*
The moose likes HTML, CSS and JavaScript and the fly likes Javascript needs Object in request/StrutsForm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javascript needs Object in request/StrutsForm" Watch "Javascript needs Object in request/StrutsForm" New topic

Javascript needs Object in request/StrutsForm

Alejandro Ross

Joined: Jun 13, 2006
Posts: 9
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,
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60800

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.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Javascript needs Object in request/StrutsForm
Similar Threads
How to access java from a javascript function?
difference between page and request
Passing String[] from jsp to applet
Value from select element is null in request
How to get an ArrayList Object in servlet from JSP?