Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Uploading Applet

 
Ulrika Bramer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I was asked to do a signed applet that upload files from a client to a server. I have the tools to sign the applet but since I�m new to the java.net class I was wondering if anyone have some code-examples for this matter.
I would be so grateful....
 
Jimi Rock
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you want to use in the server side?
I have done a signed applet that works on the appletviewer and is able to do the file uploading process using servlet on the server side,if your case is the same, then the server side code and also the servlet code is provided in the following javaranch topic :
http://www.javaranch.com/ubb/Forum7/HTML/003382.html
Regards,
Jimi.
 
Ulrika Bramer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot!!!
It was just a servlet/applet pair I was looking for. I'll try your code and write back if I have any problems, if thats ok... :-)
Best regards
Ulrika
 
Jimi Rock
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Waiting!
 
Ulrika Bramer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jimi!
Can you please explain to me how the applet and servlet communicate...
How do I start or make a call to the servlet from the applet?
Like I said, I�m not very familiar with this kind of programming...

 
Jimi Rock
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If you copied the same code that I have specified , you don't need to add any thing on the servlet.
What you need to add in the client program (applet) depends on your system requirements.
Initially, I can assume that you need to add a button that when clicked, it will be able to upload your file , you need to create an instance of the UploadFile class as follows:

 
Jimi Rock
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry,
Instead of the ip address http://10.17.40.34 , you need to write localhost or the ip address of your machine. this is the ip of my machine and I have copied it as it is by mistake!
Thanks,
Jimi.
 
ritesh_java
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:
I have developed a signed applet and wish to upload a file from the local filesysteem to a ASP.Can you help me in the development of the ASP with code.
Thanks in advance.
Regards
Ritesh
Originally posted by Ulrika Bramer:
Hi!
I was asked to do a signed applet that upload files from a client to a server. I have the tools to sign the applet but since I�m new to the java.net class I was wondering if anyone have some code-examples for this matter.
I would be so grateful....


------------------
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic