aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes Attachment file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Attachment file" Watch "Attachment file" New topic
Author

Attachment file

anjana jalodiya
Greenhorn

Joined: Mar 09, 2011
Posts: 14
I want to provide file attachment functionality in my application with this help i could be able to submit files on the web how can i implement this functionality in core java .
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1477
    
    6

I don't think core java has such functionality. You probably have to look into jee or use some third party apis like apache commons.


Swastik
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19722
    
  20

Check out HttpClient. The server needs to have a servlet, JSP page, PHP page, etc that can handle the uploaded files.

Moving to Sockets and Internet Protocols since it's not directly related to user interfaces, other than the JFileChooser you may need to select the files.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
anjana jalodiya
Greenhorn

Joined: Mar 09, 2011
Posts: 14
Rob Spoor wrote:Check out HttpClient. The server needs to have a servlet, JSP page, PHP page, etc that can handle the uploaded files.

Moving to Sockets and Internet Protocols since it's not directly related to user interfaces, other than the JFileChooser you may need to select the files.


thanks for replying
I m using JFileChooser option to give the file selection facility but now problem is with attachment
as m working on desktop application with jboss server.........as i read from net there a java mail functionality to implement such kind of things....but i m not implementing mail type concept.i just want to give attachment facility where user can attach there document.i m also confuse where i should i save the attachment file on database or on server.
Ramesh Donnipadu
Ranch Hand

Joined: Sep 16, 2000
Posts: 100
Anjana,

Have you heard of Multipart content type?

Jason Hunter's MultipartRequest utility class will help you http://www.servlets.com/cos/javadoc/com/oreilly/servlet/MultipartRequest.html

Similar discussion at http://www.jguru.com/faq/view.jsp?EID=160

HTH,
Ramesh
anjana jalodiya
Greenhorn

Joined: Mar 09, 2011
Posts: 14
Ramesh Donnipadu wrote:Anjana,

Have you heard of Multipart content type?

Jason Hunter's MultipartRequest utility class will help you http://www.servlets.com/cos/javadoc/com/oreilly/servlet/MultipartRequest.html

Similar discussion at http://www.jguru.com/faq/view.jsp?EID=160

HTH,
Ramesh


thanks for reply
 
Don't get me started about those stupid light bulbs.
 
subject: Attachment file