• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

@MultipartConfig in Glassfish 3.1.1

 
Ranch Hand
Posts: 36
jQuery Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if I didn't specify a location in the @MultipartConfig annotation, how can I access the uploaded file through code?

How can I retrieve the file where Glassfish has put it?

The idea is, the user uploads a .csv file, then the server reads that .csv file.
The problem arises when I didn't use the location method of the @MultipartConfig like:



now, I don't know how to retrieve/search/read the .csv file. I don't know where glassfish has put it and I can't find any API methods to do it. Please help.
 
Jelo Nehuptra
Ranch Hand
Posts: 36
jQuery Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
got it

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jelo,

you do not need to know the path to the uploaded file as you can access the file(s) via getParts() / Part#getInputStream().

Best regards
Christian
 
The City calls upon her steadfast protectors. Now for a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic