You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Azhar Khan <ak...@amazon.com> on 2001/04/17 09:51:36 UTC
re: parameters in java
I am trying to pass parameters to an applet via a .html file
So here's my html code
<APPLET
CODE = "orgchart2.labels"
CODEBASE = "javaclasses"
WIDTH = "600"
HEIGHT = "600"
>
<PARAM NAME = "top_panel_size" VALUE = "3" >
<PARAM NAME = "top_panel_elements_0" VALUE = "one" >
<PARAM NAME = "top_panel_elements_1" VALUE = "two" >
<PARAM NAME = "top_panel_elements_2" VALUE = "three" >
</APPLET>
And in my .java file for applet i'm trying to retrieve these parameters. I
can however, retrieve all the values but when i try to retrieve the value
for "top_panel_size" i am getting this error
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:373)
at java.lang.Integer.parseInt(Integer.java:454)
at orgchart2.labels.init(labels.java:28)
at sun.applet.AppletPanel.run(AppletPanel.java:344)
at java.lang.Thread.run(Thread.java:484)
***************************************************************MY .JAVA FILE
CODE
int size = Integer.parseInt(getParameter("top_panel_size"));
Thanks.
-- Azhar Khan
Software Development Engineer
Intranet Technologies, Amazon.com
206-266-1188
http://www.amazon.com