Skip to content

Category Archives: Servers

Configuring Tomcat 5.5 JNDI Datasources with Spring

First of all, make sure you’re looking at the Tomcat 5.5 JNDI HowTo, not the Tomcat 5, and definitely not Tomcat 4. Yes, I know this sounds obvious, but once you start googling you’ll find it’s hard to distinguish the versions. Place a context definition in /META-INF/context.xml – this is the preferred 5.5 per-application method [...]

Configuring A Remote Pine Client for a Dreamhost Account

I wanted to make sure I write this down somewhere, because I always forget how to configure Pine. I found a nice artical here, but had to go to google’s cache of the page to view it because it’s password protected now. Here are the configuration entries I made to get pine working with my [...]

Tomcat Classloader hierarchy, a quick review

Taken from Tomcat’s reference page. Tomcat’s classloader hiararchy looks something like this: Bootstrap | System | Common / \ Catalina Shared / \ Webapp1 Webapp2 .. etc Classloader rules: * Classloaders will only load the “same” class once. * Two classes are only the “same” if they have the same name, and were loaded by [...]

Eclipse Plugin: Log Watcher

I found this plugin to be pretty useful. You can set up a variety of log files to tail, and create filters for them. Per this summary: LogWatcher – A Plugin for Monitoring Changes to Files Summary: The LogWatcher plugin is precisely the kind of plugin I like: compact, focused, and well thought out. LogWatcher [...]

Server-side image drawing and jpeg encoding with AWT

Recently I had an interesting problem to solve. A manufacturing client wanted to know if it was possible to dynamically draw images based on engineering and dimensional data provided by end-users, and show them on the Web. So, the first question I have to answer is. “Is this doable?” And my answer, as always, is [...]

Java Integration Testing with HSQLDB

I’m a fairly recent convert to unit testing, but still when I’m under pressure to get something finished, I skip right to integration tests. Despite the guilt I still use the junit framework for these integration tests… I know the unit testing purists will be rolling their eyes at this point, but this is something [...]

Configuring Tomcat to point to source directory for auto deploy

Tired of manually copying jsp files, or classes/jars that modify frequently to your webapp directory? (even if it means to run a single ant task) You can make Tomcat point to your source codebase and autodeploy automatically. Copy the following into your tomcat/conf/Catalina/localhost/myproject.xml Assuming that you have your entire ‘web’ directory structure which has css, [...]

Debugging Spring MVC Startup Errors In Tomcat

I’ve been getting startup errors trying to deploy this spring MVC application: SEVERE: Error listenerStart I can’t find the error in the logs since this is a container start up error. Here’s what I did: Prequisite: attach the spring src Put a breakpoint in the ContextLoaderListener: in the spring jar on the build path, find [...]