bhavani
bhavani

Reputation: 11

system.properties in AWS

Amazon elastic beanstalk tomcat java web application issue with system.properties. When I use system.getproperty("user.home") to access directory correctly to export a file in my java web application, i can test it fine when i run on localhost. After deploying App to AWS elastic beanstalk..user.home gives me this path /usr/share/tomcat8 and user as tomcat. Where as it should give C:/users/myname as user.home and myname as user. Please help. I am struggling from 2 days on this issue. Is it something to set up in AWS environmental properties ? or is there any other way to access local downloads folder in web application. Thanks

Upvotes: 0

Views: 917

Answers (1)

pr0gramista
pr0gramista

Reputation: 9008

/usr/share/tomcat8 it is Unix like file path, because on AWS your app runs on some kind of Linux. C:/users/myname is Windows like path.

That's normal and should be expected.

Accessing local downloads folder can be tricky as it is platform/OS dependent. Consider your app structure and how it should work as it is possible that you don't need this local downloads folder.

Upvotes: 1

Related Questions