Openshift context path

1.1k views Asked by At

I have deployed the war into tomcat 7 Openshift . Everything is fine and its running .Myappp Here is my mapped web application.

I am storing images in the dir webapps->docs->images But When I upload the image (with UI) it doesnt appear on site and I cant even find where images are stored (I connected using FTP -filezilla ) Where my deployed war file stored ? Do I need to make any changes in my code so to upload in proper dir of Openshift?? Thanks in advance

1

There are 1 answers

2
AudioBubble On BEST ANSWER

You should use your OPENSHIFT_DATA_DIR (~/app-root/data) to store uploaded images. However, using Java this presents some challenges. I would recommend that you read through this article (https://forums.openshift.com/how-to-upload-and-serve-files-using-java-servlets-on-openshift), it should help you with dealing with user uploaded images.