Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Values from Applet in HTML Form 1

Status
Not open for further replies.

iolaper

MIS
Jun 7, 2004
98
US
I have a HTML form, and I call an applet within it using the code, <applet code=mycross.class width=520 height=500> </applet>.
I want to know how I can extract values from this applet and display it on my HTML form. (The value I need to extract is a 2D String array.)
I need to do this because I have to process the values i get from the applet, using a servlet that will receive inputs from this HTML form.
Any help will be greatly appreciated. Thanks.
 
Remember what you are writing here. An applet & an html page. One is in effect a standalone application, that JUST happens to be embedded in your html page. You need to communicate with any http based resource as you would any other - ie via HTTP. So try using the java.net.HttpUrlConnection class.

--------------------------------------------------
Free Database Connection Pooling Software
 
Hey thanks.. i got a clue from ur mail and I have it working now.
Is there a way to write a file on to the disk from an applet?? I DONT WANT TO INVOKE A SERVLET to do this task. I want the applet to write the file.
Any sugegstions? Thanks in advance...
 
You can use an applet to write a file to the client machine (a servlet could never write a file to thr client because the servlet executes on the server, not the client), however the applet must be signed - has info on how to sign applets.

--------------------------------------------------
Free Database Connection Pooling Software
 
Hi,
I used this link to create signed applets..

I followed it step by step.
I'm stuck at this step: use the HTML Converter to convert the file to include OBJECT and EMBED tag for IE and Netscape.......
How do I do that?? Coz I'm stuck here and not sure how to proceed.

Also, I am going to use my applet in IE.
Can u tell me where I can get these tools from?
a) cabarc : for creating cabinet files
b) makecert: which creates a test X.509 certificate.
c) signcode: for signing the code.
d) com.ms.security package.

Thanks so much in advance.
 
I looked at that link, and I would advise not using it, as it seems a bit out of date, and talks about using classes for the MSJVM plugin, which will be discontinued after September 2004, due to court battles between Sun & MS.

I would use these links :



--------------------------------------------------
Free Database Connection Pooling Software
 
I downloaded the duke.x509;
executed the keytool -import -alias Duke -file Duke.x509
saved the .java.policy in my user.home directory.

I still have the same problem. My applet code uses the "JFileChooser" to read files on Client machine. How do I associate a certificate to my code?

Thanks for ur help in advance..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top