[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"blog-post-changing-the-location-of-the-coldfusion-2016-webroot":3},{"id":4,"title":5,"body":6,"date":255,"description":12,"extension":256,"meta":257,"navigation":258,"path":259,"published":258,"seo":260,"slug":261,"stem":262,"summary":5,"tags":263,"__hash__":266},"blog/blog/2016-02-17-changing-the-location-of-the-coldfusion-2016-webroot.md","Changing the Location of the ColdFusion 2016 Webroot",{"type":7,"value":8,"toc":253},"minimark",[9,13,21,24,41,44,246,249],[10,11,12],"p",{},"Alrighty. First blog post of the year (and for a while). Better late than never right?",[10,14,15,16,20],{},"So Adobe have slipped their newest version of ColdFusion, ColdFusion 2016, into the wild. My opinion of it is kind of ",[17,18,19],"em",{},"meh",". After participating in the pre-release, I've realized there's really nothing in it for me that would make me switch. I have one client on ColdFusion 11 and if I was to move them any which way in the CFML world, it'd probably be in the direction of Lucee; which is what all of my other projects use. That's a whole other topic though ;)",[10,22,23],{},"There is one bit of info I wanted to pass on that ties into ColdFusion 2016 and the version of Apache Tomcat it uses, Tomcat 8. Changing the location of the Webroot. When I first found out that CF2016 was using Tomcat 8 I was quite delighted. There's a fair amount of newer features and changes compared to Tomcat 7; though I don't know how much of that is lost since Adobe have hacked apart the vanilla install of Tomcat to work with ColdFusion.",[10,25,26,27,34,35,40],{},"Since version 10, ColdFusion has used various releases of Tomcat 7. The method for changing the location of the Webroot then was to use the \"aliases\" attribute within a Context element of server.xml as explained by both ",[28,29,33],"a",{"href":30,"rel":31},"http://blog.bittersweetryan.com/2012/02/changing-webroot-of-coldfusion-zeus.html",[32],"nofollow","Ryan Anklam"," and ",[28,36,39],{"href":37,"rel":38},"http://dnando.github.io/blog/2014/12/04/change-location-of-cf11-webroot/",[32],"Nando Breiter"," in their blog posts. With the coming of version 8 however, this method has been deprecated and removed. The \"new\" way is to pass the location in a Resources element.",[10,42,43],{},"Here's an example of changing the location of the Webroot for ColdFusion 2016 in Tomcat 8 from within the Host element of server.xml...",[45,46,51],"pre",{"className":47,"code":48,"language":49,"meta":50,"style":50},"language-xml shiki shiki-themes github-light github-dark github-dark monokai","\u003CHost name=\"localhost\" appBase=\"webapps\" unpackWARs=\"true\" autoDeploy=\"false\">\n    \u003CContext path=\"\" docBase=\"C:\\websites\\coldfusion2016\\wwwroot\" workDir=\"C:\\ColdFusion2016\\cfusion\\runtime\\conf\\Catalina\\localhost\\tmp\">\n          \u003CResources>\n              \u003CPreResources className=\"org.apache.catalina.webresources.DirResourceSet\" base=\"C:\\ColdFusion2016\\cfusion\\wwwroot\\CFIDE\" webAppMount=\"/CFIDE\" />\n              \u003CPreResources className=\"org.apache.catalina.webresources.DirResourceSet\" base=\"C:\\ColdFusion2016\\cfusion\\wwwroot\\WEB-INF\" webAppMount=\"/WEB-INF\" />\n          \u003C/Resources>\n    \u003C/Context>\n\u003C/Host>\n","xml","",[52,53,54,105,140,151,187,216,226,236],"code",{"__ignoreMap":50},[55,56,59,63,67,71,74,78,81,83,86,89,91,94,97,99,102],"span",{"class":57,"line":58},"line",1,[55,60,62],{"class":61},"s__4a","\u003C",[55,64,66],{"class":65},"sIn_X","Host",[55,68,70],{"class":69},"s9ihy"," name",[55,72,73],{"class":61},"=",[55,75,77],{"class":76},"svw4x","\"localhost\"",[55,79,80],{"class":69}," appBase",[55,82,73],{"class":61},[55,84,85],{"class":76},"\"webapps\"",[55,87,88],{"class":69}," unpackWARs",[55,90,73],{"class":61},[55,92,93],{"class":76},"\"true\"",[55,95,96],{"class":69}," autoDeploy",[55,98,73],{"class":61},[55,100,101],{"class":76},"\"false\"",[55,103,104],{"class":61},">\n",[55,106,108,111,114,117,119,122,125,127,130,133,135,138],{"class":57,"line":107},2,[55,109,110],{"class":61},"    \u003C",[55,112,113],{"class":65},"Context",[55,115,116],{"class":69}," path",[55,118,73],{"class":61},[55,120,121],{"class":76},"\"\"",[55,123,124],{"class":69}," docBase",[55,126,73],{"class":61},[55,128,129],{"class":76},"\"C:\\websites\\coldfusion2016\\wwwroot\"",[55,131,132],{"class":69}," workDir",[55,134,73],{"class":61},[55,136,137],{"class":76},"\"C:\\ColdFusion2016\\cfusion\\runtime\\conf\\Catalina\\localhost\\tmp\"",[55,139,104],{"class":61},[55,141,143,146,149],{"class":57,"line":142},3,[55,144,145],{"class":61},"          \u003C",[55,147,148],{"class":65},"Resources",[55,150,104],{"class":61},[55,152,154,157,160,163,165,168,171,173,176,179,181,184],{"class":57,"line":153},4,[55,155,156],{"class":61},"              \u003C",[55,158,159],{"class":65},"PreResources",[55,161,162],{"class":69}," className",[55,164,73],{"class":61},[55,166,167],{"class":76},"\"org.apache.catalina.webresources.DirResourceSet\"",[55,169,170],{"class":69}," base",[55,172,73],{"class":61},[55,174,175],{"class":76},"\"C:\\ColdFusion2016\\cfusion\\wwwroot\\CFIDE\"",[55,177,178],{"class":69}," webAppMount",[55,180,73],{"class":61},[55,182,183],{"class":76},"\"/CFIDE\"",[55,185,186],{"class":61}," />\n",[55,188,190,192,194,196,198,200,202,204,207,209,211,214],{"class":57,"line":189},5,[55,191,156],{"class":61},[55,193,159],{"class":65},[55,195,162],{"class":69},[55,197,73],{"class":61},[55,199,167],{"class":76},[55,201,170],{"class":69},[55,203,73],{"class":61},[55,205,206],{"class":76},"\"C:\\ColdFusion2016\\cfusion\\wwwroot\\WEB-INF\"",[55,208,178],{"class":69},[55,210,73],{"class":61},[55,212,213],{"class":76},"\"/WEB-INF\"",[55,215,186],{"class":61},[55,217,219,222,224],{"class":57,"line":218},6,[55,220,221],{"class":61},"          \u003C/",[55,223,148],{"class":65},[55,225,104],{"class":61},[55,227,229,232,234],{"class":57,"line":228},7,[55,230,231],{"class":61},"    \u003C/",[55,233,113],{"class":65},[55,235,104],{"class":61},[55,237,239,242,244],{"class":57,"line":238},8,[55,240,241],{"class":61},"\u003C/",[55,243,66],{"class":65},[55,245,104],{"class":61},[10,247,248],{},"That's it for now. Cheers.",[250,251,252],"style",{},"html pre.shiki code .s__4a, html code.shiki .s__4a{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .sIn_X, html code.shiki .sIn_X{--shiki-light:#22863A;--shiki-default:#85E89D;--shiki-dark:#85E89D;--shiki-sepia:#F92672}html pre.shiki code .s9ihy, html code.shiki .s9ihy{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E}html pre.shiki code .svw4x, html code.shiki .svw4x{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}",{"title":50,"searchDepth":107,"depth":107,"links":254},[],"2016-02-17","md",{},true,"/blog/2016-02-17-changing-the-location-of-the-coldfusion-2016-webroot",{"title":5,"description":12},"changing-the-location-of-the-coldfusion-2016-webroot","blog/2016-02-17-changing-the-location-of-the-coldfusion-2016-webroot",[264,265],"ColdFusion","Apache Tomcat","8cplwfD-kxVME5qE5d0sm0w10QzQekmVDYeXEW2gheA"]