Calling a javascript function from a Java web app

Posted on 2008-10-31
Last Modified: 2013-11-23
I've got a Java web app that runs and manipulates data. One of the new data sources is a third party vendor who provides its data via a script. Typically, the user would place a script on their page and when the page is loaded, the data is displayed on the page, ie:

<script src=""></script><script>function(params)</script>

Is there a way that I can call this from my Java web app?
Question by:nicktimesthree
  • 3
  • 2
LVL 21

Expert Comment

ID: 22853919
you could use an applet...
LVL 21

Accepted Solution

silemone earned 125 total points
ID: 22853927

Author Comment

ID: 22854090
Thanks. Once I've created that applet, my java app can instantiate it and call it. What methods are best for accessing what that applet returns (for parsing purposes)?

Author Comment

ID: 22854229
Maybe some more information might help. My app aggregates data in to a single source. Typically, it pulls RSS feeds/XML, parses, and writes it locally. I need to add this third party source to the data to be aggregated so I have to find a way to call the script and get at its results.
LVL 21

Expert Comment

ID: 22960995
To access what the applet returns?  please explain further....

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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
fibonacci ten numbers 4 45
expectj telnet failing 5 45
jmss example java 2 23
Cisco ASA: Java web start no go, asdm launcher no go 3 37
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

828 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