aspose file tools*
The moose likes Applets and the fly likes Code! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Code!" Watch "Code!" New topic
Author

Code!

Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
Hi,
I created following applet for URL connection.
(Stephanie added UBB tags here)

when i tried compile, i am getting following errors:
unreported exception in Java.io.IOException;must be caught or declared to be thrown in openconnection and getInputstream
Let me know what is wrong here.
Thanks in advance,
Angela
[This message has been edited by Stephanie Grasson (edited December 04, 2000).]
[This message has been edited by Stephanie Grasson (edited December 04, 2000).]
Sathya Jith
Greenhorn

Joined: Dec 02, 2000
Posts: 14
If you don't feel bad, sometimes solving a problem ourselves
help a lot though it takes a lot of time.
My experience is try things out and you will learn a great deal
in the process and get help only when it is almost impossible to solve.
Please take my word in a positive way. No offence meant.

------------------
Sathyajith


Sathyajith
Stephanie Grasson
Ranch Hand

Joined: Jun 14, 2000
Posts: 347
Angela,
If you make the following modification to your code, it will compile:

Also, I added UBB tags to your original post. If you would please use them in the future, it makes it much easier for us to read your code and answer your questions.
Thank you for posting.
Stephanie
[This message has been edited by Stephanie Grasson (edited December 04, 2000).]
Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
Hi Stephanie Grasson
Thanks a lot!!! It's compiled. Please let me know how to put code in UBB tag. I will definitely use it. I am very new in URL connection stuff. Here would you please explain me that this will only make connection to the server or it will connect as well as client will request Advftrs.htm page to server. If it is yes, how server will pass Advftrs.htm back to the client.(Please add in code about response from server to client,means how to use outputstream) Last, can we use getInputstream without BufferReader.
Thanks again Stephanie for helping me a lot!
Angela

Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
Originally posted by Angela Jessi:
Hi Stephanie Grasson
Thanks a lot!!! It's compiled. Please let me know how to put code in UBB tag. I will definitely use it. I am very new in URL connection stuff. Here would you please explain me that this will only make connection to the server or it will connect as well as client will request Advftrs.htm page to server. If it is yes, how server will pass Advftrs.htm back to the client.(Please add in code about response from server to client,means how to use outputstream) Last, can we use getInputstream without BufferReader.
I put this class file in HTML:
<HTML>
<HEAD>
<TITLE>Client to Server Example</TITLE>
</HEAD>
<BODY>
<APPLET CODE="FinalAppletN.class" WIDTH=300 HEIGHT=300>
</APPLET>
</BODY>
</HTML>
When i run, it doesn't show anything.At status bar it gives me message FinalAppletN.class not found. THOUGH I PUT HTML AND CLASS FILE IN C DRIVE DIRECTLY.ALSO I CHECKED JAVA PLUGIN.I HAVE WINDOWS 2000. I DON'T WHY I CAN NOT SEE APPLET. WHEN I RUN APPLICATION I CAN SEE IT. I DON'T KNOW HOW TO USE APPLETVIEWER.
Thanks again Stephanie for helping me a lot!
Angela

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Code!