• Post Reply Bookmark Topic Watch Topic
  • New Topic

FileInputStream inside of a .war file...

 
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!