In this section

Site navigation below

The Code Style site has evolved by gradual refinement and accumulation of features and content. This review is part of a fully backdated site log and archive that sheds light on when, why and how particular features were implemented.

This log is sometimes updated several times per week, sometimes with a long overdue backlog of items. Many log entries refer to the Code Style Java package, which delivers the servlet services and utilities used to manage this site.

Subscribe to the news feed for this log: RSS news feed

Reverse chronology

New font survey browsers, 31th July 2005

Updated the Code Style font survey results, and the browser reference table with a number of new releases: OmniWeb 563.46 and Camino 0.9 alpha 2 for Mac, Firefox 1.0.5 for Mac and Windows, and Opera 8.01 for Windows.

Xalan output method NullPointerException, 30th July 2005

Noticed NullPointerException being reported with the Dublin Core RDF test cases, which are set to return a text/plain rendering of the XML/RDF output. Eventually traced this back to the version of Apache Xalan in the Sun Java 1.5, JAXP 1.3 release. Xalan appears to throw this exception when the XSL output method for an XML template is set to text and there are non-XSL namespace elements in the output.

Corrected the Xalan processing problem by returning a fixed XSL output type from the ResultType classes, RdfResultType, RssResultType, XhtmlResultType and JavascriptResultType. These types now modify only the HTTP Content-Type in response to the type request parameter and client Accept header. In retrospect, it was incorrect and unnecessary to change the XSL output method in this case, which appears to have been silently ignored by the earlier version of Xalan.

Took the opportunity to update the JavascriptResultType with the application/javascript content type, see the IETF Scripting Media Types draft.

Added Apache Log4J loggers to several XSL result proxy component classes to help trace the Xalan NullPointerException issue, namely: AbstractParseServlet, ResultMarshaller, ResultProxy and SAXTransformer. Set the logging level to DEBUG in most cases, with some WARN statements to monitor caught exceptions.

Reporting SAXParseException, 25th July 2005

Modified the SAX StrictErrorHandler to throw a ReportingParseException. ReportingParseException is a subclass of SAXException that is constructed with a SAXParseException and gives a detailed validation error message. Also created a set of test documents to check the message details.

CSS overflow workaround, 25th July 2005

Added an override to the CSStdLayoutCommon.css style sheet for the overflow: auto rule for pre-formatted text. Clients that do not support the overflow property, like Internet Explorer 6, make the page too wide and break the floated layout of the page. This workaround hides the override with a CSS level 2 child selector.

/*
  Longer preformatted lines take more
  width.
*/
#Content pre.Wide,
#Content dl dd pre.Wide {
  margin-right:     0;
}
/*
  Override for user agents that support
  overflow.
*/
body > #Content pre.Wide {
  margin-right:     31%;
  overflow:         auto;
}
body > #Content dl dd pre.Wide {
  margin-right:     32%;
  overflow:         auto;
}
      

Latest FAQ answers, 23rd July 2005

Added new answers to the Java language, programming, servlets, HTML and site manager sections, as follows.

HTML & XHTML

Java command line

Java servlets

Java utility classes

Site manager

JAXP 1.3 compatibility issues, 21st July 2005

Discovered that Java 1.5 with JAXP 1.3 has stricter XML validation while upgrading the Metacentric service to a new host. The new Apache Xerces parser supports the W3C Namespaces in XML 1.1 recommendation, in which attributes of type ID must not contain any colons. This caused SAX validation problems with some Code Style form fields that had colons in their label/id pairs. Removed colons from all affected pages.

The new compiling XSL transformer also inserts HTML format meta http-equiv elements for UTF-8 encoding into the document flow for XSL templates with the output method html. Empty elements are also forced to HTML format, even when generated in XHTML form. Had to modify the Code Style XhtmlType class to return the xml output type for XSL transformations and amend test cases accordingly.

Tomcat ClientAbortException, 20th July 2005

Discovered Tomcat 5.5.4 throws a ClientAbortException when clients terminate HTTP connections before it has a chance to flush its output buffers. This is logged at the WARN level, so is quite conspicuous, but should not be regarded as a problem apparently. The exception is thrown on a worker thread which is issued from a thread pool, but Jason Brittain says the application is designed to handle this efficiently.

Refactored ResultCache, 19th July 2005

Extracted various concrete methods from ResultCache to create a new AbstractResultCache base class, to simplify the creation of types with different storage mechanisms. Also removed the file-specific getStoreModified() method from the CacheValue interface to make the overall scheme more flexible.

Also refactored AbstractParseServlet to introduce new template methods getResolver and getCache so that implementations can load an alternative SAX EntityResolver or Cache type. Created an AbstractParseServletBase with a shared implementation of the new template methods for the standard parse servlets.

Separate Java language FAQ, 2nd July 2005

Added new answers to a range of FAQ pages and split the Java language answers out into a new page. Some questions needed re-classification.

Java inheritance

Java language

Java programming

Java servlet "how to"

Javascript "how to"

Servlet containers

Servlet lifecycle

Tomcat configuration

Web fonts

Previously on Code Style

These backdated pages record detailed changes to the Code Style Web site since July 2000, when development first got underway. Some pages may refer to documents or features that have since changed or are no longer part of the site, but the archive is checked to ensure there are no dead links.

Add this page to your chosen social bookmarking service

Style warning - please read

Home · CSS · Java · Javascript · HTML · Help · Log