<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Codebackup's Weblog &#187; Tomcat</title>
	<atom:link href="http://codebackup.wordpress.com/category/tomcat/feed/" rel="self" type="application/rss+xml" />
	<link>http://codebackup.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Tue, 22 Apr 2008 06:35:09 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='codebackup.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/67ce527a89558f4211dc502477115737?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Codebackup's Weblog &#187; Tomcat</title>
		<link>http://codebackup.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://codebackup.wordpress.com/osd.xml" title="Codebackup&#8217;s Weblog" />
	<atom:link rel='hub' href='http://codebackup.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Log4j, Wicket, Tomcat, and NetBeans IDE</title>
		<link>http://codebackup.wordpress.com/2007/10/03/log4j-wicket-tomcat-and-netbeans-ide/</link>
		<comments>http://codebackup.wordpress.com/2007/10/03/log4j-wicket-tomcat-and-netbeans-ide/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 08:03:00 +0000</pubDate>
		<dc:creator>codebackup</dc:creator>
				<category><![CDATA[Log4j]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[Wicket]]></category>
		<category><![CDATA[and NetBeans IDE]]></category>

		<guid isPermaLink="false">http://codebackup.wordpress.com/2007/10/03/log4j-wicket-tomcat-and-netbeans-ide/</guid>
		<description><![CDATA[I&#8217;m getting acquainted with Wicket  (which I blogged about here). In doing  so, I encountered some problems and got a few responses from Wicket&#8217;s mailing  list. Someone suggested that I use Log4j to debug my issues, and  so &#8212; for the first time &#8212; I used Log4j today. So here, as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codebackup.wordpress.com&blog=3015088&post=144&subd=codebackup&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m getting acquainted with <a href="http://www.wicket-library.com/">Wicket</a>  (which I blogged about <a href="http://blogs.sun.com/roller/page/geertjan/20050428">here</a>). In doing  so, I encountered some problems and got a few responses from Wicket&#8217;s mailing  list. Someone suggested that I use <a href="http://logging.apache.org/log4j/docs/">Log4j</a> to debug my issues, and  so &#8212; for the first time &#8212; I used Log4j today. So here, as a reminder to myself  and possibly of benefit to others, is what I did to use Log4j for debugging a  Wicket application deployed over Tomcat from NetBeans IDE:  </p>
<ol>
<li>Stop the running Tomcat instance. (In the IDE&#8217;s Runtime window.)   </li>
<li><a href="http://jakarta.apache.org/commons/logging/index.html">Download</a>  Commons Logging and copy the JAR to Tomcat&#8217;s <tt>common/lib</tt> folder.   </li>
<li><a href="http://logging.apache.org/log4j/index.html">Download</a> Log4j and  copy the JAR to Tomcat&#8217;s <tt>common/lib</tt> folder.   </li>
<li>Create a <tt>log4j.properties</tt> file in Tomcat&#8217;s <tt>common/classes</tt>  folder. Make sure it contains the following line:
<pre>log4j.logger.wicket.util.resource=DEBUG</pre>
<p>The above line is only for the <tt>resource</tt> package. To enable debugging  for <i>all</i> the Wicket packages, use this instead:  </p>
<pre>log4j.logger.wicket=DEBUG</pre>
<p>This is my <a href="http://blogs.sun.com/roller/resources/geertjan/log4j.properties">log4j.properties</a>  file. Make sure that you change the <tt>log4j.appender.R.File</tt> property to  point to <tt>logs/tomcat.log</tt> file in Tomcat&#8217;s base directory (which is  inside the NetBeans IDE user directory).  </p>
</li>
<li>Deploy the Wicket application. (In the IDE&#8217;s Projects window.)   </li>
<li>Go to the <tt>logs/tomcat.log</tt> file in Tomcat&#8217;s base directory and, if  errors have been picked up, note that there are lines such as the following:
<pre>2005-07-02 20:41:25,140 [http-8084-Processor23]DEBUG wicket.util.resource.locator.ResourceStreamLocator -Attempting to locate resource 'wicket/examples/navomatic/Page1.html'on path [folders = [\], webapppaths: []]</pre>
</li>
</ol>
<p>Finally, I&#8217;ve found this document to be very helpful in setting up Log4j for  Tomcat: <a href="http://minaret.biz/tips/tomcatLogging.html">Logging for Apache  Tomcat and Velocity using Log4j</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/codebackup.wordpress.com/144/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/codebackup.wordpress.com/144/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codebackup.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codebackup.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codebackup.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codebackup.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codebackup.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codebackup.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codebackup.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codebackup.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codebackup.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codebackup.wordpress.com/144/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codebackup.wordpress.com&blog=3015088&post=144&subd=codebackup&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://codebackup.wordpress.com/2007/10/03/log4j-wicket-tomcat-and-netbeans-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf1de83ed50fae6e604f74b2a2914836?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">codebackup</media:title>
		</media:content>
	</item>
	</channel>
</rss>