File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes problem with getParameter from html page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "problem with getParameter from html page" Watch "problem with getParameter from html page" New topic

problem with getParameter from html page

netanel weinberg

Joined: May 10, 2004
Posts: 27
Hello, i have this code:
in html file:

<APPLET archive="Awb.jar" code="Awb.Awb" width=850 height=700>
<param name="p1" value="CN" />
<param name="p2" value="1234" />

and this code in my applet class:
public Awb() {
String awbprefix = getParameter("p1");
String awbnumber = getParameter("p2");
if (awbprefix.compareTo("none")!=0 && awbnumber.compareTo("none")!=0)

the Awb() method is the constructor of the applet
i can't get the parameters and getting the error unknown source...
i can't figure out what is the problem

10x ahead
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1141

I believe the Applets forum is probably more appropriate for your question.

In any case, from the code you have provided, it looks like you may not exactly understand how applets work. Allow me to suggest the Writing Applets trail in the Java tutorial.

Good Luck,
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

Moving to the Applets forum.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: problem with getParameter from html page
It's not a secret anymore!