Java Applet Parameter Limit  
Author Message
nodemons





PostPosted: 2004-12-19 2:31:00 Top

java-programmer, Java Applet Parameter Limit Hi all,

I would like to know the maximum number of parameters that can be passed
to an applet. While I think there is no theoretical maximum, I believe
there to be a practical limitation for browsers.

I am using winXP, IE6 and firefox1, and jre1.4.2.

I have a graphing applet which works very well except when there are a
large number of parameters i.e. 5000. When I load such an example with
appletviewer the applet opens fine. However when I load the same applet
in either IE6 or firefox1 then nothing happens except the page appears
to be loading but gets no where even if you leave it for hours - in
other words the browsers seem to hang. Java does not appear to load into
memory - the icon does not appear in the system tray which leads me to
believe that it is a browser limitation, rather than a java one.

Does anyone know if there is such a limitation? Do you think it could be
remedied by merging the tags - i.e. having less but longer params? Or is
there another way of passing data to the applet?

Many thanks,

Chris.
 
Andrew Thompson





PostPosted: 2004-12-20 10:06:00 Top

java-programmer >> Java Applet Parameter Limit On Sat, 18 Dec 2004 18:30:41 GMT, nodemons wrote:

> I have a graphing applet

URL? Is the HTML valid?

...
> Does anyone know if there is such a limitation?

I do not know of any such limitation.

>..Do you think it could be
> remedied by merging the tags - i.e. having less but longer params?

Possibly. I recall that LG3D can accept it's 3D models either
from an external file or by emdebbing the data dirictly into a single
applet param. AFAIR, LG3D was able to accept models as large as 100-
200Kb, though it made a lot more sense to put those in an external
file (as they could be zipped)

>..Or is there another way of passing data to the applet?

Let's rule out other possible causes of problems first.
If you have not validated the HTML, do so.
<http://validator.w3.org/>

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
 
nodemons





PostPosted: 2004-12-21 4:52:00 Top

java-programmer >> Java Applet Parameter Limit Andrew Thompson wrote:
> On Sat, 18 Dec 2004 18:30:41 GMT, nodemons wrote:
>
> ...
>
> Let's rule out other possible causes of problems first.
> If you have not validated the HTML, do so.
> <http://validator.w3.org/>
>

Ok, it wasn't valid HTML, but it is now and the same problem is
occuring. It is now up at:

www.ocular-design.co.uk/bigproblemagain.html

TIA,

Chris.
 
 
Andrew Thompson





PostPosted: 2004-12-21 7:34:00 Top

java-programmer >> Java Applet Parameter Limit On Mon, 20 Dec 2004 20:51:50 GMT, nodemons wrote:

> Andrew Thompson wrote:
>> On Sat, 18 Dec 2004 18:30:41 GMT, nodemons wrote:
>>
>> ...
> >
>> Let's rule out other possible causes of problems first.
>> If you have not validated the HTML, do so.
>> <http://validator.w3.org/>
..
> Ok, it wasn't valid HTML, but it is now and the same problem is
> occuring. It is now up at:
>
> www.ocular-design.co.uk/bigproblemagain.html

A few comments.

- It is easier to debug HTML when it is HTML 4.01 or
HTML 3.2 than XHTML, but yes, it does seem valid.

- You want to feed 1.8 MBytes of data in applet 'param' tags?
That is absofrigginlutely insane! If somebody in a browser company
decided to set an arbitrary limit to the amount of applet data, I
can well imagine them setting it at something closer to 200Kb.

- Given the insanity of feeding 1.8Meg of data, you should go with an
earlier suggestion. Dump it all to a file on the server, zip the file,
then put a single parameter in the applet pointing to the file.

HTH

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
 
 
nodemons





PostPosted: 2004-12-21 8:18:00 Top

java-programmer >> Java Applet Parameter Limit Andrew Thompson wrote:
> - You want to feed 1.8 MBytes of data in applet 'param' tags?
> That is absofrigginlutely insane! If somebody in a browser company
> decided to set an arbitrary limit to the amount of applet data, I
> can well imagine them setting it at something closer to 200Kb.
>
> - Given the insanity of feeding 1.8Meg of data, you should go with an
> earlier suggestion. Dump it all to a file on the server, zip the file,
> then put a single parameter in the applet pointing to the file.
>
> HTH

Yes it does, thanks. I was beginning to think as I uploaded the file on
to the web with a dial up connection that this was verging on madness.
To be fair in reality it will almost exclusively be used locally but it
looks like the browsers cant handle that anyway. I shall begin to
research how to implement the alternative methods.

Thanks again for your help,

Chris.
 
 
Andrew Thompson





PostPosted: 2004-12-21 8:49:00 Top

java-programmer >> Java Applet Parameter Limit On Tue, 21 Dec 2004 00:17:52 GMT, nodemons wrote:

> ..I shall begin to
> research how to implement the alternative methods.

Your data appears to be large swathes of common collections of data
that suggest each might be considered (or handled) as an object.
If this applet is 1.4+ you could look to XML to write the objects,
or alternately implement serializable on them and write an array
or vector of the objects. You might even roll your own textual
format file to write the data.

In each case it makes sense to write the data zipped, as even a
1.1 applet can download and expand zipped data.

HTH

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane