4.5.4.017 to 5.2.9.31 Upgrade

I upgraded to the latest version of 5.2.9.31. After the upgrade, my web contexts changed.

Before Upgrade:

After Upgrade:

Is this related to the BonCode Connector.

Thank you,

Dale

have you accessed http:/localhost:80 ? contexts are automatically created once they are accessed

Zac,

Just tried that. Nothing changed.

Dale

Zac,

The main problem now is that I no longer have webroot at c:\inetpub\wwwroot for port 80.
It’s defaulting back to c:\lucee\tomcat\webapps\root .

Dale

Do you have a “localhost” entry in IIS? That would create the localhost context in Lucee like Zac mentioned.

What are you using the “localhost” entry for specifically? Maybe there’s a better way to do what you’re doing there…

Jordan,

Are you speaking about the host file in windows\system32\drivers\etc? If so, no.

I do use localhost in a few places in my code when a page is called and within that page I make a cfhttp call to a cfc file.

Why do the contexts change after the upgrade and I lose the ability to call virtual directory sites on port 80?

Thank you,

Dale

Jordan,

I found a solution, but not sure why it worked.

Before I ran the update, I deleted the c:\inetpub\wwwroot\web-inf directory.

Is there anything stored in there that I might have lost?

It recreated a new one.

Dale

Only the custom settings for that context

Nope, in IIS. A specific “site” in IIS called “localhost”. Just trying to verify…

The way Tomcat works with sites is with a concept called “contexts”. Contexts are usually directly corollated to an individual website, but they do not have to be. Adobe CF takes a “single context” approach to working with CFML files, and all host definitions are handled by ACF in the single context. Lucee, and Railo before it, have taken a more traditional J2EE approach to contexts where each domain needs it’s own context - though, this may change in the future.

When you have a site in IIS that passes a request back to Tomcat, Tomcat needs to resolve that request to a specific context. You can define these contexts manually using the Tomcat server.xml file which is loaded at Tomcat boot time, or if you use the Installer, a context will be created on the fly that matches your web server config. Once a context is created for a specific domain, it will remain memory resident until the next time you restart Tomcat. So, if your IIS config is WRONG, then a wrong context will be created in Tomcat, and will remain there even if your fix IIS, until you restart or reload Tomcat.

You can test the different configs by using Tomcat’s 8888 port, which is the port that Tomcat’s internal web server listens to if you use the Lucee Installer. Using the 8888 port will show you how Tomcat’s contexts are configured, and tell you whether your issue is in Tomcat or in IIS.

If you want to learn more about how the dynamic creation of contexts works, you can check out the mod_cfml project site here:

https://viviotech.github.io/mod_cfml/index.html

Yeah, Zac is right here too. This folder just contains your context-specific configuration files. It is likely that just restarting your Tomcat instance corrected the issue.

Hopefully learning how the different pieces work will help you if you run into issues later. :slight_smile:

Kind regards,
Jordan Michaels
Vivio Technologies