Skip to Content
0
Oct 23, 2019 at 04:57 PM

How to upload and read the file in hana java application

138 Views Last edit May 21, 2020 at 03:09 PM 2 rev

Experts,

Much Appreciate your input.

I have a sample jsp which get input from user to upload a file, user once uploaded the file , I am reading it via servlet.String appPath = request.getServletContext().getRealPath("")+"\\uploadFiles"+"\\sample.txt";

The code is working fine in my local. But when i upload in hana trail its erroring out saying the path is not found.

I know somewhere am missing as program couldnt find the path in cloud. so how i can achieve this?

Kindly advise. Thanks