File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes File Uploading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "File Uploading " Watch "File Uploading " New topic
Author

File Uploading

Daslan Govender
Greenhorn

Joined: Jan 14, 2005
Posts: 19
Hi All





I require your assistance in the above matter.





I am trying to upload a file.


I pass this to a servlet.

The problems I experienced:

I can no longer access my normal parameter (i.e. textline) in the form � This is due to enctype attribute set to multipart/form-data . How do I access them now?
How do I filter for pdf �s? I tried using the accept attribute on IE and this does not work. Any Ideas?
How do I upload the file. I tried using the code attached. Where does FileOutputStream fileOut = new FileOutputStream(saveFile); save the file to. How can specify a location.


I am considering using ftp to upload the file. How do I get the attachment into an object like java.io.File ?




Your assistance will be highly appreciated.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Please keep the conversation on the same question in the same topic.

thanks


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Uploading
 
Similar Threads
How to create Multipart Request in Java Application
SCEA Part 2 Upload rights not available
Problem About Java File Upload
File Uploading
Submit multipart and form data