How can I read all applet parameters?

Here's getParameter (), which is great for reading a parameter that I know.

However, should I (for reasons of the lib architecture) read all the parameters that were passed to the applet, is there a way to do this?

I looked at the API and worked a bit googled, but no luck.

+4
source share
1 answer

AFAIK you cannot read with unknown parameters using the standard applet API.

It makes no sense. What are you going to do with unknown parameters? Take care to explain why this may be helpful.

The way to do this, however, if you really want to, is to use JavaScript and call the method defined in your applet and just pass it in the parameters.

How this works can be read in several places. Here are some starting points:

JavaScript for Java Communication (Scripting)

Liveconnect: JavaScript call in Java

Mozilla DevCenter: Java JavaScript


Regarding the comment of the authors:

If I understood correctly, you could also ensure that each applet created in lib overwrites the Applet.getParameterInfo() method and returns the corresponding information.

Now you can provide a static map for the parameters that the declared applet should support.

+1
source

All Articles