Today, while doing some Grails development I came across a peculiar issue that perplexed me and I’m documenting it for all others to benefit. (Also see my other blog from today for the issue that started this journey). Here are my specifications: Development Machine Windows-7, 64-bit java version “1.6.0_24” Java(TM) SE Runtime Environment (build 1.6.0_24-b07) Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode) Grails 1.
I’m sure if you have been developing with Java and Tomcat for sometime, you are likely to run into the infamous debug error. SEVERE: Error listenerStart You will most likely start Googling it trying to find out what the heck is going on. And in trying to see the extended logging on what that “listenerStart” error means. After some lucky searches, you will see links asking you to drop a “log4j.
Case #1: When the Tomcat config is this: [sourcecode language="jscript”] [/sourcecode] Observe the “path” element in the “Context”. Then… http://localhost/index.jsp yields to the “index.jsp” under HelloWorld folder. http://localhost/HelloWorld/index.jsp yields to a “404 Page”. Case #2: When the Tomcat setup is this: [sourcecode language="jscript”] [/sourcecode] Once again observe the “path” element in the “Context”. Then… http://localhost/index.jsp yields to a “blank page”. http://localhost/HelloWorld/index.jsp yields to a “blank page”. http://localhost/hw/index.jsp yields to the “index.