Closed
Bug 145979
Opened 23 years ago
Closed 21 years ago
Java applet does not get parameters
Categories
(Core Graveyard :: Java-Implemented Plugins, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 217715
People
(Reporter: dirk.grossmann, Assigned: blackconnect)
References
Details
Attachments
(1 file)
1.03 KB,
application/octet-stream
|
Details |
Mozilla 1.0 RC2 on Windows 2000 Prof. (German), JDK 1.3.1_03
I send such HTML to the browser :-
<html><title>projecteo: Download - Bitte warten Sie</title>
<script language='javascript'>
function resizeWindow() {var s="window.resizeTo(560, 310);"; eval(s);}</script><body
onload="Javascript:resizeWindow()">
<applet code="constructeo.FileTransferApplet" archive="constructeo.jar"
width="500" height="240">
<param name='Mode' value='Download'>
<param name='ConfigVersion'
value='Config|Version|1.0.310|http://jens-test/projecteo_aide/aide/rubrique.asp?Rubrique=99000000'>
<param name='ConfigCache' value='Config|Cache|1'>
<param name='ConfigXML' value='Config|XML|0'>
<param name='ConfigPagesUpload'
value='Config|Pages|Upload|jens-test.mybau.com/serv_fichier/transfert/upload.asp'>
<param name='ConfigPagesDownload'
value='Config|Pages|Download|jens-test.mybau.com/serv_fichier/transfert/download.asp'>
<param name='ConfigPagesDownloadFinish'
value='Config|Pages|DownloadFinish|jens-test.mybau.com/serv_fichier/transfert/downloadfinish.asp'>
<param name='DownloadFinish'
value='http://jens-test.mybau.com/serv_fichier/transfert/downloadfinish.asp'>
<param name='UploadFinish'
value='http://jens-test.mybau.com/serv_fichier/transfert/uploadfinish.asp'>
<param name='PostFileUrl'
value='http://jens-test.mybau.com/serv_fichier/transfert/post_file.asp'>
<param name='PostFilePartSizeInKB' value='32'>
<param name='CloseWindowUrl'
value='http://jens-test.mybau.com/gdp/include/menu/close_windows.html'>
<param name='QueryString'
value='Contact=20287&Projet=55&Langue=EN&Unique=1471&SK=%14ZY%5BV%5E%29%5FVB%29%2A%2DYB%5BW%2C%2CB%2DY%5C%29B%2DX%2CY%2B%5D%2C%2E%2E%5D%5BW%12'>
<param name='File0'
value='DownloadRequest|U|H:\Test-Up|KIF_0009.JPG|jens-test.mybau.com/|tmp-file-tmp\Genfiles\20287|2002051510095624582639.JPG.zip_1471|55|264414|245826|39|xml|none|1959462'>
<param name='File1'
value='DownloadRequest|U|H:\Test-Up|KIF_0013.JPG|jens-test.mybau.com/|tmp-file-tmp\Genfiles\20287|2002051510095724582743.JPG.zip_1471|55|264414|245827|43|xml|none|2268362'>
<param name='File2' value='DownloadRequest|U|H:\Test-Down|Die Linden bei
Ebersberg.JPG|jens-test.mybau.com/|tmp-file-tmp\Genfiles\20287|2002051513521724582843.JPG.zip_1471|55|264414|245828|43|xml|none|1974377'>
</applet></body></html>
When the applet calls getParameter("File0"), it sometimes gets null.
Please see also:
http://bugzilla.mozilla.org/show_bug.cgi?id=145950
(same steps to reproduce this behavior)
Comment 1•22 years ago
|
||
impossible to reproduce without a valid test case
this is oji after all i think
Comment 2•22 years ago
|
||
I am experiencing this exact same behavior with Mozilla 1.0.1 (yes I know its
old) and with Mozilla Firebird 0.6.1
using either applet or object tags, none of the parameters are available to be
read by getParameter() which is returning null. All of my applets are working
in other browsers. It's only Mozilla browsers where they are failing.
Try to read parameters using getParameter("file1") with a parameter tag like so:
<param name="file1" value="myfile">
results in a null pointer being returned only in Mozilla browsers.
This is very critical as NONE of my applets work with Mozilla browsers since
they all use <param> tags!
I have tried this on both Windows and Linux platforms with the same results.
Comment 3•22 years ago
|
||
*** Bug 215575 has been marked as a duplicate of this bug. ***
Comment 5•22 years ago
|
||
I am also confirming that this bug occurred under Linux too. So I think that
the OS should be changed to All to reflect multiple platforms.
Comment 6•21 years ago
|
||
This bug has also been encountered using Windows XP, Mozilla 1.5, Sun plugin
1.4.1_06
We've found the case of the java applet getParameter() call returning null to be
somewhat random, but definately related to the amount of text between the
<applet> and </applet> tags.
More specifically, we've found a situation where changing the amount of text by
1 character seems to make the difference between the bug occurring or not.
( <param name="a" value="blah"> vs <param name="a" value="blahX"> )
The problem does not reliably happen every time; we often have to re-visit the
offending page anywhere between 1 and 20 times in order for it to manifest.
Also note that not every getParameter() call returns null.
Comment 7•21 years ago
|
||
On applets I've written, it seems to happen when the parameters list is
generated on the fly (with PHP or JSP), and the page takes some time to load
(more than 3 seconds). Could Mozilla be initializing the applet before the
applet closing tag? If I save the page source and then load the raw HTML to
start the applet, the problem doesn't occur.
Comment 8•21 years ago
|
||
I see this happening repeatedly at the NWS Weather Radar Loop site:
http://www.wrh.noaa.gov/radar/loop/DS.p19r0/si.kotx.shtml
I think, that in this case, the parameter is a text file that contains a list of
files that change every ten minutes or so. For some reason, every so often, the
applet fails to get the parameters and this causes the browser to hang.
UA: Mozilla/5.0 (Windows; compatible; U; Windows NT 5.1; en-US; rv:1.7b)
Gecko/20040223 Firefox/0.8.0+
Comment 9•21 years ago
|
||
I got the same with firebird 0.7 and my debian unstable.
Comment 10•21 years ago
|
||
Comment 11•21 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
sun jvm 1.4.2_03
I've encountered a similar problem when retrieving applets from an embedded
webserver I am working with.
In the case of that webserver, It can be reproduced...
When using another server, I don't have any problem.
At the moment, I can't get one of those embedded servers online, but I'll see
what I can do in the near future.
For now, I'll describe the situation.
1) The embedded server has a special TCP/IP stack that doesn't work with windows.
After each block of 512 bytes, it sends his buffer, and waits for an ACK of the
client to continue.
2) This way, some files are transmitted in pieces, and other IP packets can
arrive in between the parts.
When working with windows, the packages arrive right after each other in most
cases, and are ACK'ed together.
3) When I traced the packets on my LAN, the data was splitted as following:
#start of 1st packet
<html>
<head>
even een titeltje zetten
</head>
<body>
<br><br>
<center>
<applet code=ParamApplet.class
height=100
width =100>
<param name="par01" value="val01"/>
<param name="par02" value="val02"/>
<param name="par03" value="val03"/>
<param name="par04" value="val04"/>
<param name="par05" value="val05"/>
<param name="par06" value="val06"/>
<param name="par07" value="val07"/>
<param name="par08" value="val08"/>
<param name="par09" value="val09"/>
<param name="par10" value="val
#end of 1st packet
#start of 2nd packet
10"/>
<param name="par11" value="val11"/>
<param name="par12" value="val12"/>
<param name="par13" value="val13"/>
<param name="par14" value="val14"/>
<param name="par15" value="val15"/>
</applet>
</center>
</body>
</html>
#end of 2nd packet
The result:
From par01 to par09, getParameter() returns the correct value.
After that, it only returns a null value.
Conclusion:
Only the parameter tags that are completed in the part containing the start of
the applet tag are processed correctly.
Comment 12•21 years ago
|
||
**Update**
I pulled a few strings, and there's an embedded webserver on a 'permanent'
connection now.
The url: http://hpc.edna.be
**Content**
The html code can be viewed using "view page source", so I won't past it here.
The applet posted above tries to read the parameters from the html, and prints
them in the java console.
And yes, the applet remains gray, no fancy things here.
**Test systems**
Windows 2003 - enterprise edition (UK)
JDK 1.4.2_03
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.5) Gecko/20031007 Firebird/0.7
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.6) Gecko/20040113
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
Windows XP /w SP1 & SP2 (NL)
JDK 1.4.2_02
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
**Results**
On mozilla (both firebird/fox and normal):
...
val08
val09
val10
null
null
null
null
null
On Internet Explorer 6 (same OSes):
...
val08
val09
val10
val11
val12
val13
val14
val15
**Java source code**
import javax.swing.*;
public class ParamApplet extends JApplet
{
public void init()
{
String par01 = getParameter("par01");
String par02 = getParameter("par02");
String par03 = getParameter("par03");
String par04 = getParameter("par04");
String par05 = getParameter("par05");
String par06 = getParameter("par06");
String par07 = getParameter("par07");
String par08 = getParameter("par08");
String par09 = getParameter("par09");
String par10 = getParameter("par10");
String par11 = getParameter("par11");
String par12 = getParameter("par12");
String par13 = getParameter("par13");
String par14 = getParameter("par14");
String par15 = getParameter("par15");
System.out.println(par01);
System.out.println(par02);
System.out.println(par03);
System.out.println(par04);
System.out.println(par05);
System.out.println(par06);
System.out.println(par07);
System.out.println(par08);
System.out.println(par09);
System.out.println(par10);
System.out.println(par11);
System.out.println(par12);
System.out.println(par13);
System.out.println(par14);
System.out.println(par15);
}
public void start(){}
public void stop(){}
}
**Conclusion**
I hope this will help...
Comment 13•21 years ago
|
||
*** This bug has been marked as a duplicate of 217715 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Updated•13 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•