0

I want to get some data on the server side from a JSON file but I dont know where can I put the file in Jersey 2.18 folder structure?

I appreciate any help.

Ken Y-N
  • 14,644
  • 21
  • 71
  • 114
Mr Asker
  • 2,300
  • 11
  • 31
  • 56
  • Very vague question. Store wherever you like as long as you can access it- check this post http://stackoverflow.com/questions/18664579/recommended-way-to-save-uploaded-files-in-a-servlet-application/18664715#18664715 – Sheetal Mohan Sharma Jun 16 '15 at 15:30
  • Put it in the classpath, then see [here](http://stackoverflow.com/q/1464291/2587435) – Paul Samsotha Jun 16 '15 at 15:40
  • can not I put it in the resourses folder? src-main-resources – Mr Asker Jun 16 '15 at 15:46
  • Yup, that's ends up being the classpath (if you're using maven) – Paul Samsotha Jun 16 '15 at 16:04
  • Note that it is Jersey, not GlassFish that is 2.18, so I edited your question. Secondly, the file location is not a factor for Jersey, it is for your WAR file structure. Here is a [question regarding reading a text file from a WAR file](https://stackoverflow.com/questions/13242782/reading-a-text-file-in-war-archive) that may help you out. – Ken Y-N Jun 19 '15 at 01:54

0 Answers0