<?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/"
	>

<channel>
	<title>Thoughts Electrique &#187; Tomcat</title>
	<atom:link href="http://www.sebastian.himberger.de/blog/tag/tomcat/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sebastian.himberger.de/blog</link>
	<description>Sebastian Himbergers blog about technology and software development</description>
	<lastBuildDate>Thu, 08 Jul 2010 17:05:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting up XWiki in Tomcat and MySQL</title>
		<link>http://www.sebastian.himberger.de/blog/2009/09/10/setting-up-xwiki-in-tomcat-and-mysql/</link>
		<comments>http://www.sebastian.himberger.de/blog/2009/09/10/setting-up-xwiki-in-tomcat-and-mysql/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 13:32:34 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[XWiki]]></category>

		<guid isPermaLink="false">http://www.sebastian.himberger.de/blog/?p=468</guid>
		<description><![CDATA[I recently set up a new XWiki 2.0 instance (with MySQL) for documentation purposes. Although some of the steps are already described in the XWiki manual I&#8217;ll document it here mainly because I keep forgetting things. Also step-by-step tutorials come in handy when you&#8217;re in a hurry.

Create the webapp directory
Since the configuration files have to [...]]]></description>
			<content:encoded><![CDATA[<p>I recently set up a new <a title="XWiki Enterprise website" href="http://enterprise.xwiki.org" target="_blank">XWiki 2.0</a> instance (with MySQL) for documentation purposes. Although some of the steps are already described in the XWiki manual I&#8217;ll document it here mainly because I keep forgetting things. Also step-by-step tutorials come in handy when you&#8217;re in a hurry.</p>
<p><span id="more-468"></span></p>
<h3><strong>Create the webapp directory</strong></h3>
<p>Since the configuration files have to be modified an exploded WAR has to be used. The webapp directory has to be created and the WAR will be extracted inside of it.</p>
<pre class="terminal">mkdir xwiki &amp;&amp; cd xwiki
unzip ../xwiki.war
rm ../xwiki.war</pre>
<h3><strong>Create and configure a database</strong></h3>
<p>Create a database including a dedicated database user. Open the file <em>WEB-INF/hibernate.cfg.xml</em> and uncomment the MySQL block. Modify the following properties:</p>
<ul>
<li>connection.username</li>
<li>connection.password</li>
<li>connection.url</li>
</ul>
<p><strong>Important:</strong> Don&#8217;t forget to add the <a title="MySQL JDBC Connector" href="http://dev.mysql.com/downloads/connector/j/" target="_blank">MySQL JDBC driver</a> to your classpath (e.g. WEB-INF/lib).</p>
<p><strong>Note: </strong>It is of course also possible to use a container managed DataSource via JNDI.</p>
<h3><strong>Configure Logfile</strong></h3>
<p>Since the security manager restricts file IO to the webapp directory the logging has to be reconfigured. To do so the <em>log4.properties</em> file has to be copied from <em>xwiki-core-2.0-milestone-4.jar</em> to the <em>WEB-INF/classes</em> directory. After this the property <em>log4j.appender.file.File</em> has to be modified to point to a writeable path.</p>
<h3><strong>Add the context file to Tomcat</strong></h3>
<p>Add a file name <em>${context}.xml</em> to the <em>/conf/Catalina/localhost</em>&#8221; directory of <em>$CATALINA_HOME</em> (the Tomcat instance) and put the following content into it:</p>
<pre class="file">&lt;Context path="<strong>${contextPath}</strong>" docBase="<strong>${pathToWebapp}</strong>" &gt;&lt;/Context&gt;</pre>
<p>Eventually put in references to resources like DataSource&#8217;s etc.</p>
<h3><strong>Create the proxy settings in Apache HTTPD</strong></h3>
<p>You can use any proxy settings. I&#8217;m currently using a very simple setup:</p>
<pre class="file">&lt;Proxy ajp://localhost:10709*&gt;
  Allow from all
&lt;/Proxy&gt;

RewriteEngine On
RewriteRule ^/$ /<em>xwiki</em>/ [R=301,L]

ProxyPass        /      ajp://localhost:10709/
ProxyPassReverse /      ajp://localhost:10709/</pre>
<p><strong>Note:</strong> <em>xwiki </em>is the contextPath</p>
<h3><strong>Test the installation</strong></h3>
<p>Surf to http://www.yourdomain.com/. An empty XWiki page should be displayed. The first step should always be to register a user so the administration area is accessible. The default content can be imported by using the page <em>/${contextPath}/bin/import/XWiki/XWikiPreferences</em>.</p>
<p>I&#8217;ll probably blog more about XWiki and how to customize it in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastian.himberger.de/blog/2009/09/10/setting-up-xwiki-in-tomcat-and-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m choosing Tomcat (again)</title>
		<link>http://www.sebastian.himberger.de/blog/2009/02/26/im-choosing-tomcat-again/</link>
		<comments>http://www.sebastian.himberger.de/blog/2009/02/26/im-choosing-tomcat-again/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 20:46:12 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Opinionated]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://www.sebastian.himberger.de/blog/?p=347</guid>
		<description><![CDATA[As you may remember from my last blogpost I&#8217;m currently setting up a new hosting Server. Since this server will also host some OpenCms and JEE sites I need to set up a Servlet Container. In almost all of my projects until today Tomcat was successfully used for this purpose. Be it stand alone or [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-348 alignleft" style="margin: 5px; float: left;" title="Tomcat from Shrek" src="http://www.sebastian.himberger.de/blog/wp-content/uploads/2009/02/tomcat-300x225.jpg" alt="" width="200" height="150" />As you may remember from my last blogpost I&#8217;m currently setting up a new hosting Server. Since this server will also host some <a title="OpenCms website" href="http://www.opencms.org" target="_blank">OpenCms</a> and JEE sites I need to set up a Servlet Container. In almost all of my projects until today <a title="Tomcat website" href="http://tomcat.apache.org" target="_blank">Tomcat</a> was successfully used for this purpose. Be it stand alone or embedded in a JEE application server (e.g. JBoss).</p>
<p>I must admit that I always had some kind of a love-hate relationship with Tomcat. The classloader had some bad issues when reloading a webapplication too often and often killed the complete server. Taking down all of the other webapplications too. Although this has gotten a lot better recently it&#8217;s still bothering me a bit.</p>
<p>Since I had some time after my last project I started investigating other open source alternatives. I often heard of Jetty, praised for it&#8217;s speed and simplicity, it seemed like a great alternative and I played around with it a bit. I really liked it since it was simple to use and easy to deploy but as I started to google for things like performance measurements or how to use it with a security manager I didn&#8217;t really found a lot of documentation (compared to Tomcat) and the performance doesn&#8217;t really doesn&#8217;t seem to differ from Tomcats.</p>
<p>So I&#8217;m once again going the Tomcat route. It has a big community and is even used in military and government organizations. It&#8217;s really not a technology decision (although I think Tomcat is solid) but more political thinking.</p>
<p>It will also save me some time which I can invest in trying out other technologies. <em>Meow&#8230;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastian.himberger.de/blog/2009/02/26/im-choosing-tomcat-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
