File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes File Delete using webwork Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "File Delete using webwork " Watch "File Delete using webwork " New topic

File Delete using webwork

Harry Kyoshiro

Joined: Sep 15, 2004
Posts: 10

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


Name : John
browse file to upload : sample.doc


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));

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

Somebody help me please

Visit my blog<br /> <br /><a href="" target="_blank" rel="nofollow"></a>
It is sorta covered in the JavaRanch Style Guide.
subject: File Delete using webwork
It's not a secret anymore!