• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Attachment file

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 .
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Marshal
Posts: 22444
121
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
anjana jalodiya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic