Network connection part 1: Get Tomcat
Written by:
maffelu
, 2009-07-20 08:32:04
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.
Pre-requisites
The latest
NetBeans with J2ME and Web features installed
The latest
JDK version
Installation
1
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!
2
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:
<tomcat-users>
<role rolename="manager"/>
<role rolename="standard"/>
<user username="admin" password="password" roles="standard,manager"/>
</tomcat-users>
Change the password to whatever you want
This user will be used later on.
3
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!
2010-08-31 20:58:21
What is the code of sending sms and mms