• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Uploading Applet

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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....
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Waiting!
 
Ulrika Bramer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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....



------------------
reply
    Bookmark Topic Watch Topic
  • New Topic