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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
ArrayLists in ArrayLists/HashMaps? 4 40
firstChar challenge 13 86
GUI builder for Eclipse? 8 11
Java JRE greater than 1.6 5 24
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

760 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

19 Experts available now in Live!

Get 1:1 Help Now