HostOnNet.com Forum Index HostOnNet.com
Private Label Reseller Plan
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

HOWTO: installing tomcat on cpanel servers

 
Post new topic   Reply to topic    HostOnNet.com Forum Index -> Linux Server
View previous topic :: View next topic  
Author Message
admin
Site Admin


Joined: 23 Jan 2003
Posts: 256
Location: India

PostPosted: Wed Apr 30, 2003 5:04 pm    Post subject: HOWTO: installing tomcat on cpanel servers Reply with quote

The first major hurdle in installing tomcat is not to use the tomcat 4.1.2 (jsp-install-4.x.tar.gz) package that is up at http://layer1.cpanel.net I haven't known of anyone actually getting this package to work properly on their systems. If anyone has, they haven't shared the information as to how.

Instead try and find the older tomcat 4.0.3 package (also titled jsp-install-4.x.tar.gz) If someone wants to setup a mirror for this let me know and I will upload it.

once you have the file login as root and run the following commands:
gunzip jsp-install-4.x.tar.gz
tar-xvf jsp-install-4.x.tar
cd jsp-install-4.x/
./install.sh

At this point j2sdk and tomcat should install without any problems. Once they have finished make sure to add the following lines to your /usr/local/apache/conf/httpd.conf file under the AddModule section:

Include "/usr/local/jakarta/jakarta-tomcat-4.0.3-src/build/conf/auto/mod_jk.conf"
AddModule mod_jk.c

Verify that index.jsp has been added DirectoryIndex

and add AddType text/html .jsp in the AddType section (all of this is within your httpd.conf)

You may also find it useful to add the following to your web.xml in order for both servlet and servlets to be valid paths. (thanks to dgbaker)

after the current invoker add the following lines

<servlet>
<servlet-name>invoker2</servlet-name>
<servlet-class>org.apache.catalina.servlets.InvokerServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>

Add this right after the current invoker mapping

<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlets/*</url-pattern>
</servlet-mapping>

Once this is done anything in /home/user/public_html/WEB-INF/classes will work when called in the following manor:
http://www.mydomain.com/servlet/servletname or http://www.mydomain.com/servlets/servletname


How to install servlet access to accounts:

Within WHM you will have an extra section entitled 'Plugins' with one option 'Install Servlets'. Only install servlets on accounts which actually require the use of java as servlets take a lot of system resources and you will want to limit the number of accounts having access to java while still maintaining a stable server.


This should be all... let me know if I missed anything. I'm still trying to work on war deployment and some individual web.xml issues on my server.
_________________
HostOnNet.com - Reseller Hosting
Free Ads Forum, Promote your site
NetFreeHost.com - Free Web Hosting, phpBB Hosting
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    HostOnNet.com Forum Index -> Linux Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


For Support - http://forums.BizHat.com

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!