• 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

File Delete using webwork

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


I'm using package com.opensymphony to upload file.
Its work to upload file, but i wonder how i can delete file ?

Ex : i have a simple form
Name : Harry
browse file to upload : test.txt

delete


Name : John
browse file to upload : sample.doc

delete



So.. if i delete Harry, i want delete just Harry's file, not john file.
i put the upload file in C:/temp/upload

i've tried to write code like this
String dirUpload = "C:/temp:upload";
File file = new File(getServletContext.getRealPath(dirUpload));
file.delete();


For your information, i'm using webwork 2.0, jakarta-tomcat4.1.29

Somebody help me please
Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic