<?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>Binary Tides &#187; Tomcat</title>
	<atom:link href="http://www.binarytides.com/blog/category/tomcat/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.binarytides.com/blog</link>
	<description></description>
	<lastBuildDate>Sat, 24 Jul 2010 05:31:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Install Apache Tomcat 5.5 on Ubuntu 8.04 Hardy Heron</title>
		<link>http://www.binarytides.com/blog/install-apache-tomcat-5-5-on-ubuntu-8-04-hardy-heron/</link>
		<comments>http://www.binarytides.com/blog/install-apache-tomcat-5-5-on-ubuntu-8-04-hardy-heron/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 16:49:00 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=39</guid>
		<description><![CDATA[To install and run Tomcat on Ubuntu (8.04 over here) the following packages should be installed from synaptic :
1.  tomcat5.52. tomcat5.5-webapps3. sun-java6-jdk
They can be installed from command line using the command sudo apt-get

After synaptic finishes installing them open /etc/default/tomcat5.5 and edit it as follows :
Find :#JAVA_HOME=/usr/lib/jvm/java-6-sun
Change : Remove the # so that it is [...]]]></description>
			<content:encoded><![CDATA[<p>To install and run Tomcat on Ubuntu (8.04 over here) the following packages should be installed from synaptic :</p>
<p>1.  tomcat5.5<br />2. tomcat5.5-webapps<br />3. sun-java6-jdk</p>
<p>They can be installed from command line using the command sudo apt-get</p>
<p><span id="more-39"></span></p>
<p>After synaptic finishes installing them open /etc/default/tomcat5.5 and edit it as follows :</p>
<p>Find :<br />#JAVA_HOME=/usr/lib/jvm/java-6-sun</p>
<p>Change : Remove the # so that it is uncommented.<br />JAVA_HOME=/usr/lib/jvm/java-6-sun</p>
<p>It points to the java home which can be java-6-sun or any other java .</p>
<p>Then restart tomcat5.5 from command line like this :</p>
<p>enlightened@enlightened-desktop:~$ sudo /etc/init.d/tomcat5.5 restart<br />* Stopping Tomcat servlet engine tomcat5.5                              [ OK ]<br />* Starting Tomcat servlet engine tomcat5.5                              [ OK ]</p>
<p>Now open in your browser the url :</p>
<p>http://localhost:8180/</p>
<p>And the welcome page of Apache Tomcat should appear.</p>
<p>The file<br />/usr/share/tomcat5.5/conf/tomcat-users.xml<br />has the default username and password listed which is username : tomcat and password : tomcat.</p>
<p>On the tomcat welcome page Tomcat Administration link is on the left :<br />http://localhost:8180/admin</p>
<p>Opening this page might show the error message :<br />HTTP Status 403 &#8211; Access to the requested resource has been denied</p>
<p>To fix the above issue open the file<br />/usr/share/tomcat5.5/conf/tomcat-users.xml</p>
<p>sudo gedit /usr/share/tomcat5.5/conf/tomcat-users.xml</p>
<p>and add a role called admin and user called admin with that role :</p>
<p>&lt;role rolename=&#8221;admin&#8221;/&gt;<br />&lt;user username=&#8221;admin&#8221; password=&#8221;tomcat&#8221; roles=&#8221;tomcat,admin&#8221;/&gt;</p>
<p>Restart tomcat from command line as shown above.</p>
<p>Now log in to the administration panel :<br />http://localhost:8180/admin</p>
<p>with username : admin and password : tomcat.<br />The login should take you to the admin panel without any error.</p>
<p>To the left is another link of Tomcat Manager :<br />http://localhost:8180/manager/html</p>
<p>which might still show the error of Access denied.</p>
<p>To fix this issue simply login to the admin panel and create a role called manager (if it doesnt exist) and assign this role to a non-admin user like tomcat or create a new user.</p>
<p>Then log in to the Tomcat Manager page and it should open fine without any errors.</p>
<p>Now /usr/share/tomcat-webapps is the folder that contains the jsp files/webapps which are accessible from localhost:8180 url.</p>
<p>To change the directory of webapps to say one in /home/username/tomcat</p>
<p>Open : /usr/share/tomcat5.5-webapps/ROOT.xml</p>
<p>Look for :<br />Context path=&#8221;/&#8221; docBase=&#8221;/usr/share/tomcat5.5-webapps/ROOT&#8221;<br />and change the docBase value to the folder where the tomcat webapps would be.<br />e.g.</p>
<p>Context path=&#8221;/&#8221; docBase=&#8221;/home/enlightened/tomcat&#8221;<br />or<br />Context path=&#8221;/&#8221; docBase=&#8221;/var/www/tomcat&#8221;</p>
<p>Save the file and restart tomcat.</p>
<p>One more thing you can do is copy the contents of the /usr/share/tomcat5.5-webapps/ROOT directory to this new directory and then open the url localhost:8180 to check that everything is working fine. The admin and manager pages on the left and the jsp examples also should all open fine as previously.</p>
<img src="http://www.binarytides.com/blog/?ak_action=api_record_view&id=39&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.binarytides.com/blog/install-apache-tomcat-5-5-on-ubuntu-8-04-hardy-heron/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
