Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3338504
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:23:02+00:00 2026-05-18T00:23:02+00:00

In my page I have an applet. I’d like to pass a some data

  • 0

In my page I have an applet. I’d like to pass a some data to an applet function. I’ve found out how to do this and it worked fine for simple datatypes like strings but I’m having hard time with some nested data structures. I’m not sure what would be the right term for it — a list of dictionaries or an array of associative arrays. Here’s a snippet of my JavaScript data structure is built.

var servers = []
servers.push({'id' : 1, 'ip' : '111.111.111.111'});
servers.push({'id' : 2, 'ip' : '222.222.222.222'});
$('testapplet').setWork(servers);

How do I access this in Java? I’d like to iterate over them and print them to the console? I tried the following code but I couldn’t get it to work.

public void setWork(HashMap s[]) {
    for (int i = 0; i < s.length; i++) {
        HashMap item = s[i];
        System.out.println(item);
        System.out.println(item.get("ip"));
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:23:02+00:00Added an answer on May 18, 2026 at 12:23 am

    I’m not sure the Java/JavaScript bridge support anything other than primitive types.
    You could try serialising to JSON, then pass that over the bridge:

    ...yourcode....
    $('testapplet').setWorker(toJSON(yourvar));
    

    Edit: as just mentioned… 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple applet on a web page like this. (This is a
I have to integrate a Java applet into a simple asp.net 2.0 control. This
I have the following lines in my Java applet init function: try { this.font
I have created an applet within a web page, but whenever I run it,
I have a POS web application which currently executes a java applet on page
I have an application where an HTML page first loads, then an applet with
I have page which is redirected from htaccess. now I can pass the German
I have a page with a JS Function called test (e.g.), and, in one
I have applet embedded in http page. Applet is signed (as all jars which
I have a Java applet embedded into a web page which generates a file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.