• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Newbie][SmartUpload] [Tomcat] : open download browser in a selected folder

Shishir Sanghvi
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, im a newbie in java and i've to download some files from Tomcat's folder. But, for security purposes, i've to open the browser directly in a selected folder. Unfortunatly, i didn't succeed with the JspSmartUpload's API. Although the browser opens and th download works great, i dont know which method to use to open my browser in the folder i want(or if i can do this in html). I tried the getCollection method without success and my research didnt have hoped results.
Any suggestion would be grantly appreciatted
Here is my code:
<%@ page language="java" import="com.jspsmart.upload.*" contentType="text/html; charset=iso-8859-1" %>
<jsp:useBean id="mySmartUpload" scope="page" class="com.jspsmart.upload.SmartUpload" />
<H1>Downloading a doc</H1> <HR>


/****take back the parameter "CourseName" from a html Form****/
String NomEns = request.getParameter("courseName");
String path = "C:\\Tomcat 4.1\\webapps\\MSI\\course\\";
System.out.println("course" +courseName);

/******instanciating the upload******/


/********selected file put in a collection Files and take the name at index (0) *******/

com.jspsmart.upload.File myFile = mySmartUpload.getFiles().getFile(0);
String File_Name = myFile.getFileName();
System.out.println("file" +File_Name);

String final_path = path.concat(NomEns).concat("\\").concat("Cours").concat("\\");

/*****call the download method****/

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic