CF Summit notes - What's New and Different About ColdFusion 10 on Tomcat, Charlie Arehart

October 29, 2013

What's New and Different About ColdFusion 10 on Tomcat - Charlie Arehart

CF10 runs on TomCat, not JRun like previous versions of cf
mostly transparent. no real noticeable changes for most people

also, you CAN deploy ON TomCat where you install TomCat yourself, then install CF as an EAR/JAR file
but that's not what we're talking about today. this session is on the "comes with" version of Tomcat/ColdFusion

JVM deployed with CF10
is 1.6.0_29 by default
Adobe added support for using Java 7 in early 2013 via "update" feature
you would then install java update, point CF to it in jvm.config
see any of many blog entries for more info on doing that
version of tomcat is viewable in release of CF10 - 7.0.23.0
both shown on CF Admin "system info" page
-- TomCat version not shown if CF10 is deployed on top native tomcat
update to later tomcat versions if/when supported by Adobe, should be possible through new update feature.

"cfusion" instance
-- gets created regardless of the version of cf10 you're using -- dev, standard, or enterprise
-- logs / config files, etc for the instance are in /cf10/cfusion/

there is no longer a separate "multi server" form of deployment
-- you just choose "server deployment"

new instances are no longer buried deep in a super long folder like it was before
now it's just in /cf10/[instance]/logs

can deploy the EAR/WAR on WebLogic, etc if you want. that's still there

each instance now has it's own jvm.config -- before they all shared the same config

"out" logs created when CF runs as a Windows service
-- now in cf10 these are in the /logs directory with all the other log files, which is different than previous versions.

2 new kinds of logs
1. metrics logging
-- similar to jrun metrics.
2. access logs
different than web server logs.
built into CF ability to see # of requests coming in, etc
/cf10/[instance]/runtime/logs
different log file every day
written to regardless if if you're using the internal or external web server.
...this is enabled because it's a feature you can configure in TomCat via "Tomcat Valves"

Solr access logs enabled by default
/cf10/instance/jetty/logs
(--jetty is the server that Solr runs on. it doesn't run on the CF instance.)

web servers - internal and external
the internal one now is tomcat web server
CAN use it for Production if you needed to (as opposed to JRun)

can enable/disable built in web server AFTER install!
change default webroot
add virtual directory
etc
all configurable via xml files


-----how is the bundled version of TC different than the stand-alone TC?----
some files are in a different place
server.xml, web.xml, catalina,properties
now in /cf10/instance/runtime/conf/ folder

the Tomcat "manager" app is NOT implemented in CF10

some mod's to Tomcat to make it more appropriate with cf10
the version of Tomcat that's in CF is not the same as the Tomcat you would download by itself
needed to add support for CGI support,
multiple webroot support
search engine safe url support, long been in CF, now added to tomcat

if you chose to implement Tomcat yourself, what might you LOSE in doing that (vs using the built-in tomcat)
you'll lose CGI variables
you'll lose multiple webroot support
cf session replication
SES urls
still, can tweak web.xml to at least get SES to work

but you'll GAIN the Manager app (if that's of use to you)

only takes 3 steps to implement Tomcat and install CF into it
1. download / install Java (req'd for Tomcat)
2. download tomcat
-- set java_home env variable
-- start tomcat /bin/ run startup script
test it as localhost: 8080
3. run the CF installer
-- drop cfusion.war into the Tomcat web apps directory
c:/tomcat/webapps
-- after a few minutes, can test it as http://localhost:8080/cfusion/CFIDE/administartor/index.cfm

for those familiar with CF (but not tomcat), what do we need to know?
some terms
"Apache" -- the web server, but also includes all the "apache project" stuff which includes Tomcat
Tomcat is a "servlet container", includes a web server / can connect to others
JBoss
-- JEE App server which bundles Tomcat
Main components of Tomcat
-- Catalina: servlet container (Tomcat engine)
-- Coyote: http connector (Tomcat's built-in web server)
-- Jasper: JSP engine

"http connector" aka "Coyote" - same thing
AJP -- way to connect to _external_ web servers (CF handles all of this, don't need to really worry about it)