Network connection part 1: Get Tomcat
What is Tomcat?
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 http://tomcat.apache.org/ (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:
<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:
Select Tomcat 6:
Find the directory where you extracted tomcat:
Now it's installed, you can open the server tab and you should find Tomcat there:
Now you can use Tomcat in NetBeans!
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.