Wednesday 22 February 2012

Installing Tomcat

I'm going to use Java to build the web service, because I know Java.  Maybe in the future I'll try this again but in another language, but for now Java it is.

I'm going to use Jersey (http://jersey.java.net/) to build my web service and Apache Tomcat (http://tomcat.apache.org/) as my web server.  The web service is a servlet and Tomcat is a servlet container.

I'll get tomcat installed first.  I'm going to install it locally so I can test it locally.  I'll figure out how to run it on AWS later.  I'm using Tomcat 7.  The instructions on how to install tomcat are pretty straight forward on the Tomcat site.  I'm using a Mac Book to develop on and did the following steps:


  • Downloaded the core.tar.gz from http://tomcat.apache.org/download-70.cgi
  • Un packed it to a convenient location on my machine
  • In the bin directory of the tomcat directory created a setenv.sh file with the following in it:
#!/bin/sh
CATALINA_HOME = /path/to/apache/apache-tomcat-7.0.26

where /path/to/apache is your path to where ever you installed tomcat.

  • in a terminal shell executed the command ./startup.sh (found in the tomcat/bin directory)
  • navigated to http://localhost:8080/ in a browser and voila I see the tomcat startup screen!
Well, the baby is waking up.  So that's all for today.  The grammar in this post is probably bad, but I got tomcat installed!

References:

Friday 17 February 2012

My goal

I haven't programmed in about 6 months but would like to work on a small project when I have a few spare moments.  So, I need something that is interesting but do-able in my time allotment.   I haven't had a chance to work with cloud computing or mobile apps, so I'm going to create something that uses both.  I'm going to use Amazon Web Services to host a web service that I will call with a iPhone App.  So, here is what my project will do:

Web Service:

  • Given a temperature in Fahrenheit return the Celsius equivalent

IPhone App:

  • Have a simple interface that allows for the temperature input and displays the result from the web service.

Yes, this a rather contrived project, as there is no need to have a temperature converter be a web service. But this simple idea should let me create something uses the technologies I'm interested in.

I'm not going to set a date, for example be done by March 1st, because I don't think that's too realistic for me. So, I guess the first step is to create that web service!