{"id":5522,"date":"2014-03-30T23:40:09","date_gmt":"2014-03-30T23:40:09","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/inputstream-from-local-machine-to-tomcat-deployed-webapp-collection-of-common-programming-errors\/"},"modified":"2014-03-30T23:40:09","modified_gmt":"2014-03-30T23:40:09","slug":"inputstream-from-local-machine-to-tomcat-deployed-webapp-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/inputstream-from-local-machine-to-tomcat-deployed-webapp-collection-of-common-programming-errors\/","title":{"rendered":"InputStream from local machine to tomcat deployed webapp-Collection of common programming errors"},"content":{"rendered":"<p>Using per host property files helps in this scenario. Generally you want to contain all differences between environments to your property files.<\/p>\n<p>Check out PropertyPlaceholderConfigurer for handling switching property files.<\/p>\n<p>You&#8217;d extend that to handle the {ENV} placeholder and execute it from Spring similar to this<\/p>\n<pre><code>\n    \n\n<\/code><\/pre>\n<p>in appname-LOCAL.ini have this<\/p>\n<pre><code>text.filename=C:\\Users\\temp\\file.txt\n<\/code><\/pre>\n<p>and in appname-PROD.ini change it to a mounted drive or a different local path, something accessible from the viewpoint of your server like this<\/p>\n<pre><code>text.filename=Z:\\Users\\temp\\file.txt\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Using per host property files helps in this scenario. Generally you want to contain all differences between environments to your property files. Check out PropertyPlaceholderConfigurer for handling switching property files. You&#8217;d extend that to handle the {ENV} placeholder and execute it from Spring similar to this in appname-LOCAL.ini have this text.filename=C:\\Users\\temp\\file.txt and in appname-PROD.ini change [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5522","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5522"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5522\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}