private void cacheController(String key, JspController cont) { try { if (!_cacheControllers) return; if (cont == null) return; synchronized (_controllerCache) { if (_controllerCache.containsKey(key)) return; ByteArrayOutputStream out = new ByteArrayOutputStream(); ObjectOutputStream p = new ObjectOutputStream(out); p.writeObject(cont); p.flush(); byte b[] = out.toByteArray(); _controllerCache.put(key, b); out.close(); } } catch (IOException e) { MessageLog.writeErrorMessage( "Error caching controller:" + cont.getClass().getName(), e, this); } }