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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:00:21+00:00 2026-06-17T09:00:21+00:00

My applet is supposed to take external parameters from html file which might be

  • 0

My applet is supposed to take external parameters from html file which might be dynamically generated.

<param name="type1" value="value1">
<param name="type2" value="value2">

Those parameters has to be checked for validity in Applet.init()

String type1 = getParameter("type1");
String type2 = getParameter("type2");
if (type1 == null || type2 == null) ....

And they are wrong what should I do? Is it okay to call Applet.destroy() manually?

As I know stop and destroy are supposed to be called by browser, not applet itself.

  • 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-17T09:00:22+00:00Added an answer on June 17, 2026 at 9:00 am

    Applet.destroy() should only be called by the JVM.

    The best strategy here is to redirect to a page that shows the parameters and what is wrong with them. To do that, use something like:

    URL brokenParams = new URL(this.getDocumentBase(), 
        "badparams.html?type1=" + type1 + "&type2=" + type2);
    this.getAppletContext().showDocument(brokenParams);
    

    This will have the effect that:

    • The applet page will vanish, replaced by..
    • badparam.html which shows the params and describes the problem. Then..
    • When the JVM browser combo. decides it is the right time, the Applet.destroy() method will be called. (The ‘right time’ is typically 30-60 seconds later by my reckoning.)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote an applet which is called IdrawApplet.java and a HTML which is supposed
I'm developing an applet in Java 1.6 which is supposed (ofcourse) to run on
I'm running into an issue with my applet. It's supposed to take a url
I've put together a basic applet where the user selects a file from their
I'm writing an applet that's supposed to show both English and Japanese (unicode) characters
My applet is getting unexpectedly terminated. From log, I could see JVM heartbeat ..
I have a java applet in which I have to display a large amount
I am building Java Desktop and Java Applet from the same code. Log4j is
I have an Applet which is loading images over a http connection using URLConnection.
I've created an applet which has one large panel to display data surrounded by

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.