1

I am using heroku server to host my java spring based application. The application uses servletContext.getRealPath(""); which returns a null value. This error has been posted before Here, but those causes couldnt help me out.

I am using a free account on heroku server and i have deployed the application both, by maven commit and through the entire war file deploy, but nothing could help.

I have also written to heroku and they suggested to launch the application as an exploded war file or use AWS S3.

The reason is that i need the actual file path to write some content to the file. I wanted to know, is this common with Heroku ?? if yes how to overcome ??

Thanks in Advance

Community
  • 1
  • 1
vipul12389
  • 339
  • 7
  • 15
  • You should not be writing files to the deploy folder. Period. This is not specific to Heroku. See also among others http://stackoverflow.com/questions/14843615/servlet-failing-to-write-uploaded-image-to-disk/14845832#14845832 Just use Heroku's own data storage facilities, if any. Consult their documentation or contact their support team for details. – BalusC Jun 04 '13 at 17:52
  • Well the scenario is, i need to create a html page which will be shown in a iframe. html page contents will be selected by user through the app. Now to show the contents in iframe, the html page should be present in the web-app...!! – vipul12389 Jun 05 '13 at 04:36

0 Answers0