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 8134579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:05:10+00:00 2026-06-06T10:05:10+00:00

To make a poll form using an applet, i wanted to know how can

  • 0

To make a poll form using an applet, i wanted to know how can my applet communicate with a servlet . That servlet is meant to write the result to the text file on the server. I have no idea how can i do this.

  • 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-06-06T10:05:11+00:00Added an answer on June 6, 2026 at 10:05 am

    You could use java.net.URLConnection for this.

    Assuming that your servlet is mapped on an URL pattern of /myservlet and your applet is been served from the context root, then this should do:

    InputStream servletResponse = new URL(getCodeBase(), "myservlet").openStream();
    // ...
    

    That’s all. The getCodeBase() is inherited from Applet class and dynamically returns the applet’s code base URL (from where the applet was been downloaded). The servletResponse will contain whatever you wrote to response.getOutputStream() or response.getWriter() in the servlet. For example just an “ok” string or an easily parseable format like XML or JSON. You could pass request parameters as a query string in the GET request URL, or in the POST request body.

    See also:

    • Using java.net.URLConnection to fire and handle HTTP requests
    • https://stackoverflow.com/questions/9361399/how-to-send-list-of-objects-from-servlet-to-applet
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a vote/poll application in Flash using Actionscript 3. Is there
I have gone through Django's basic Poll tutorial, and I realize that I can
I am trying to write a set of simple client/sever programs that make use
I'm trying to make a ASP.NET (C#) poll that will ask a user a
I have a inputTextarea that I refresh using PrimeFaces' AJAX poll. When the inputTextarea
I want to make a receive location in Biztalk 2010 that will poll for
I would like to poll google every 10 seconds to make sure that there
How can I make that if the QUERY_STRING matches something it would use that
I need to make application that needs to poll server often, but GAE has
In the main loop of a worker thread that has to poll to know

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.