Wednesday, December 28, 2005
Dumping XMLHttpRequest.responseXML
I found it here.var req = new XMLHttpRequest();
...
req.send(...);
...
var xmlSerializer = new XMLSerializer();
var markup = xmlSerializer.serializeToString(req.responseXML);
alert("markup="+markup)
Here is some reference on XMLHttpRequest.
Here is how the object can be used.
Tuesday, December 13, 2005
Sample log4j.xml
Here is a sample log4j.xml for development purposes.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="[%d{dd/MM/yy hh:mm:ss:sss z}] %5p %c{2}: %m%n" />
</layout>
</appender>
<appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
</appender>
<appender name="FILE" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="/path/output.log"/>
<param name="MaxFileSize" value="1MB"/>
<param name="MaxBackupIndex" value="100"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="[%d{dd/MM/yy hh:mm:ss:sss z}] %5p %c{2}: %m%n" />
</layout>
</appender>
<root>
<priority value="info"/>
<appender-ref ref="CONSOLE"/>
<appender-ref ref="ASYNC"/>
</root>
</log4j:configuration>