Liferay and Tomcat

The road less traveled…

Well, of course, I am attempting to go my own way on this one. I want to install Liferay 4.2.2 on Tomcat 5.5.23 without having Liferay become the root context. In other words, I want my Liferay and I want my other webapps, too.

Why am I being fussy about this? Well, I don’t know. I’m not particularly attached to the default Tomcat homepage, straight out of the box. But I guess I just want finer-grained control over my Tomcat webapps. That way, if I wanted to install another rev or Liferay, or another CMS someplace else, I can just configure such as I please and assign a new URL for it – rather than getting confused about which Liferay is currently at the root context.

So, here I am following the directions and installing Liferay. “Connect the dots… La la la la…” Well, I’ve gotten to the part where I’ve renamed the file ROOT.xml to liferay.xml…

Well, things didn’t work right off the bat because I didn’t have log4j installed. So, I downloaded it and tried to compile it, but this being a fresh computer, I didn’t have ant, so I went and got that.

I tried to compile log4j and got an “invalid target: 1.1” error, which upon further research, I found a post which suggested I downgrade my Java JDK – which I did, since I’m not doing anything that takes advantage of the new JDK.

To get log4j working in Tomcat, I added the log4j-1.2.14.jar to $CATALINA_HOME/common/lib/ , then I grabbed a basic configuration example from the web and put the log4j config file at $CATALINA_HOME/common/classes/ I cranked Tomcat, and life was good, as far as fixing the “Set up logging properly” error goes.

Now it’s just plain old blowing up – Liferay won’t start properly. But at least now I have logging, so I know where the stack trace goes now….

Leave a Reply