java - Display files that have been uploaded to directory (servlet) -
so, followed tutorial upload files servlet: http://www.codejava.net/java-ee/servlet/java-file-upload-example-with-servlet-30-api creates folder (if doesn't exist) , uploads file folder. once upload in complete displays page saying upload successful. i've seen other tutorials, such one: http://www.javacodegeeks.com/2013/08/servlet-upload-file-and-download-file-example.html display download link, file uploaded. want create page uploaded file, displays links download files have been uploaded (or button direct 1 such page).
suppose you're uploading files x folder
then, iterate on x folder files
for(file f:new file("x").listfiles()){ //iterate here create download links each file }
you may use http://www.javacodegeeks.com/2013/08/servlet-upload-file-and-download-file-example.html each of file create download link
Comments
Post a Comment