Blogging Roller

Dave Johnson on open web technologies, social software and software development


Inspiration for a sniper.

I love the way that James Robertson of the Cincom Smalltalk Blog monitors my weblog for material to use against Java, J2EE, and static typing. I'm serious. I learn something everytime he fires a shot from the tower. You can learn a lot from a Smalltalker with an I-told-you-so attitude.

Tags: Java

Frustration

is having to switch back to JSP 1.2 after using JSP 2.0.
Tags: Java

FreeRoller OSCache misconfiguration.

I logged into the FreeRoller server for the first time in long time and, on a hunch, I started investigating the OSCache configuration. Turned out, the disk cache directory did not exist. I created the directory and gave it the right write permissions, but OSCache is still not using the disk cache. I'm not sure why. I turned on DEBUG logging for OSCache and I saw the message below, so OSCache clearly knows the location of the cache directory. These settings were good enough for OSCache 1.7.5. What's the deal with 2.0?

INFO HttpProcessor[80][2] com.opensymphony.oscache.base.Config - Properties { 
   cache.debug=false, 
   cache.path=/sites/hosted/freeroller/cache,
   cache.unlimited_disk=false, 
   cache.capacity=600, 
   cache.memory=true
}

I'd like to set cache.unlimited_disk=true and then use a cron job to clear the cache every night, but right now I just want to get the disk cache working. Any ideas?

Tags: Java

Struts Validator and java.math.BigDecimal.

I've been working feverishly against a Friday deadline, having lots of fun, and learning more than I ever wanted to know about Struts, Hibernate, XDoclet, etc. I'm the closest thing that we have on the project to a Struts expert, so I've had to come up to speed fast on Struts Tiles, Struts Validator, and XDoclet's Struts support. So far, so good, but now I've hit a snag. I've run up against what appears to be a serious Struts Validator limitation: no support for java.math.BigDecimal.

I tried using the double validator, but when I apply the XDoclet tag for the double validator to a field that is a BigDecimal, XDoclet does not generate an entry for the field in validation.xml. Maybe, if I can fix this I can get away with using the double validator. Hmmm...

To resolve this problem the right way, it seems that I'll need to write my own validator. No problem right? I think this involves four steps:

  • Provide a class with a validateBigDecimal() method for server-side validation.
  • Write the JavaScript for client-side validation.
  • Write the XML for my validator and put it in validator-rules.xml.
  • Fetch XDoclet from CVS and hack the Struts Validator support to handle my new validator.

That last step is a doozy. There's got to be an easier way, but googling turns up nothing. I guess I have figured out how I will spend my evening.

Tags: Java

Main | Next day (Aug 12, 2003) »