This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

FileInputStream inside of a .war file...  RSS feed

 
Brian Quinn
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a servlet that uploads a file , modifies it and sends it to the browser. Is it possible to have the file as part of the .war file and how do I access it using FileInputStream - I can't figure out what path to use - the FileInputStream can never find the path specified and I've tried a bunch. All the examples I've seen have the webapp exploded and not warred up.
 
An Dres
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried getResourceAsStream? That works for me.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!