Solved

Is it p;ossible to call a javabean method from a javascript function?

Posted on 2006-06-22
2
268 Views
Last Modified: 2008-02-01
I have a JSP in which I have defined a javabean

<jsp:useBean id="myUtility" scope="request" class="utilities.MyUtilities"/>
 this bean has a method String [] getValues().

Then I have a java script piece like this

<script type="text/javascript">
function update()
{
 
 //Is it possible to call the myUtility.getValues() from here? if so how am
 //I to define the return String array?
}

Please someone throw some light here.

0
Comment
Question by:prain
  • 2
2 Comments
 
LVL 27

Expert Comment

by:rrz
ID: 16963766
If you use AJAX, then yes.  There are a million hits on google. Here are a few.
http://developers.sun.com/ajax/ 
http://java.sun.com/developer/technicalArticles/J2EE/AJAX/ 
http://getahead.ltd.uk/dwr/
0
 
LVL 27

Accepted Solution

by:
rrz earned 100 total points
ID: 16963781
But you would have to change the bean's scope to session.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
method inner class 6 83
maven webservice projet error 6 80
struts exact match support 3 57
JavaScript parse form with colon separated values 2 78
The business world is becoming increasingly integrated with tech. It’s not just for a select few anymore — but what about if you have a small business? It may be easier than you think to integrate technology into your small business, and it’s likely…
This article describes how to reset your Windows 10 password when you've forgotten it.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question