Solved

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

Posted on 2006-06-22
2
259 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Lamba in java 8 9 235
maven webservice projet error 6 79
servlet concurrency 13 84
listing all functions in JavaScript 19 103
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now