+---------- On Mar 6, Karthik said:
> I need to pass the username that the user enters to my java code as an applet
> parameter. How can I do it ?
Instead of typing in "hostname:port/xyz.html", you should type in
"hostname:port/xyz.tcl". Make xyz.tcl a Tcl program that generates the
HTML that loads the applet. xyz.tcl can get the HTTP username using
[ns_conn authuser] and put it in a PARAM tag in the APPLET entity. For
example:
set username [ns_quotehtml [ns_conn authuser]]
ns_return 200 text/html "<html>
<head><title>My Applet</title></head>
<body>
<applet code='myapplet.class' width='400' height='300'>
<param name='username' value='$username'>
<!-- Alternate text for Java-deficient browsers. -->
Get Java, Loser!
</applet>
</body>
</html>"
In your applet, you can access that parameter using the getParameter
method of the Applet class.
I. To remove yourself from this list:
Send a message to "[EMAIL PROTECTED]" with the following text in
the BODY of your message:
signoff aolserver
II. For a complete list of listserv options please visit:
http://listserv.aol.com/
III. For more AOLserver information please visit:
http://www.aolserver.com/