• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Delete file from client system using Jsp / servlet

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi....

I m facing a problem ,

I want the user to upload a file from his system , once he selects the particular file the file must be uploaded and the file in client system should get deleted.

I need it urgently , how could i achieve this...

Thanks in advance
 
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Munir Ahmed wrote:Hi....

I m facing a problem ,

I want the user to upload a file from his system , once he selects the particular file the file must be uploaded and the file in client system should get deleted.

I need it urgently , how could i achieve this...

Thanks in advance



Do you mean that the server should delete a file on the client. That would be very insecure as then, the server can delete any file on its client. I think you should consider writing client side code for the client to upload the file to the server and then delete it.
 
Munir Ahmed
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Satya Maheshwari wrote:

Munir Ahmed wrote:Hi....

I m facing a problem ,

I want the user to upload a file from his system , once he selects the particular file the file must be uploaded and the file in client system should get deleted.

I need it urgently , how could i achieve this...

Thanks in advance



Do you mean that the server should delete a file on the client. That would be very insecure as then, the server can delete any file on its client. I think you should consider writing client side code for the client to upload the file to the server and then delete it.




Thanks for your kind reply

how to write the client side code to upload and delete the file...
the main thing i need is after uploading the file to the server the file on the client machine should get deleted...
since i will supply the file again to the client...

 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cannot be done. Neither of the client-side JavaScript or the server-side Java has the ability to affect the client file system. Thank goodness!

Your only option may be a signed applet.
 
Satya Maheshwari
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

how to write the client side code to upload and delete the file...
the main thing i need is after uploading the file to the server the file on the client machine should get deleted...
since i will supply the file again to the client...


Um.. I think I got the terminology wrong. By client side code, I meant writing a java application on the client which does this.
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could embed a nice little applet there which MUST be signed and could use it for upload.

Remember that the user still has to accept to trust the applet and you can't touch anything without his/her consent. After accepting it the machine is all yours but it is still constrained that the user has the java plugin (even to accept your signature).

Or you can look into Java Web Start (JNLP) but that takes it out of the browser.

Hope it helps.
 
Every snowflake is perfect and unique. And every snowflake contains a very tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic