problem with html file in jspsmartupload
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   john_k
Posted On:   Friday, May 24, 2002 04:58 AM

Test.html: jspSmartUpload : Sample 1 Test.jsp: <%@ page language="java" import="com.jspsmart.upload.*"%> jspSmartUpload : Sample 1 <% // Variables int count=0; // Initialization mySmartUpload.initialize(pageContext); mySmartUpload.setTotalMaxFileSize(100000); mySmartUpload.upload(); try { count =    More>>

Test.html:




jspSmartUpload : Sample 1

















Test.jsp:



<%@ page language="java" import="com.jspsmart.upload.*"%>




jspSmartUpload : Sample 1



<% // Variables


int count=0;


// Initialization


mySmartUpload.initialize(pageContext);


mySmartUpload.setTotalMaxFileSize(100000);


mySmartUpload.upload();


try {


count = mySmartUpload.save("/upload");


out.println(count + " file(s) uploaded.");


} catch (Exception e) { out.println(e.toString()); }


%>





This is working fine to upload multiple files .............


My problme is if the html is like:



Test.html:




jspSmartUpload : Sample 1













I the html contains type as text then it is not working.............


Insted of selecting the file by browsing i am entering the file path like c:/junk/Test2.jsp .....




Hi actual requirement is :



I have one html page and it displays all the files of a perticular folder and a checkbox beside the file like

Test.html

In the browser Test.html page looks like :



fileName: lock:



c:/junk/abc.jsp (checkbox here)


c:/junk/xyz.java (checkbox here)


........ ...................


..............................



Submit button here



Now User selects the list of files to upload by checking checkbox and click submit button.........


The submit button calls the upload jsp file ............
Now i want upload the the files selected by user ...............


In this case what changes i have to do in my jsp to upload the files selected by user .......


If user clicks submit button after selecting files to upload all the files names (c:/junk/abc.jsp , c:/junk/xyz.java etc) will go to upload page in the form parameters ..........


In the file upload page I retrieved that parameter thru String file1=request.getParameter("file1");


and converted the String to a file type .....


Like : File f=new File("c:/junk/abc.jsp");


Even this not working ..............................


Please help me what changes i have to do in my file ...............




Thanks.

   <<Less
About | Sitemap | Contact