MorkaLork Development

Interesting stuff I've picked up over the years...

Network connection part 1: Get Tomcat

2009-07-20 08:32:04 | 420 views | netbeans tomcat directory apache java server

What is Tomcat?

From Wikipedia:

Apache Tomcat is a servlet container developed by the Apache Software Foundation (ASF). Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, and provides a "pure Java" HTTP web server environment for Java code to run.

Tomcat should not be confused with the Apache web server, which is a C implementation of an HTTP web server; these two web servers are not bundled together. Apache Tomcat includes tools for configuration and management, but can also be configured by editing XML configuration files.

What are we gonna use it for?

We are going to attempt to let our mobile applications communicate with a server, so we're gonna use Tomcat as server.
The installation of Tomcat in Netbeans was a bit tricky which is why I'm writing this guide.


The latest NetBeans with J2ME and Web features installed
The latest JDK version



First, download the latest version of tomcat at (currently it's 6.0.20).
Do not install using the Windows Service Installer!


Extract the files at say C:\apache-tomcat-6.0.20\

Open the apache-tomcat-x.x.xx\conf   omcat-users.xml file

Add a user:

<role rolename="manager"/>
<role rolename="standard"/>
<user username="admin" password="password" roles="standard,manager"/>

Change the password to whatever you want
This user will be used later on.


Open the services window on your left sidebar (if not there, Windows->Services) and rightclick on Servers:
Finding the server tab

Select Tomcat 6:
Select Tomcat 6

Find the directory where you extracted tomcat:
Fill out the form :P

Now it's installed, you can open the server tab and you should find Tomcat there:
Find Tomcat in the server list

Now you can use Tomcat in NetBeans!

Article comments

Feel free to comment this article using a facebook profile.

I'm using facebook accounts for identification since even akismet couldn't handle all the spam I receive every day.