Project: Getting Started
Spring Term 2014
DATA MODELLING AND DATABASES
Setting up the Project Skeleton
Project: Getting Started
This document will help you in installing our example project.
Programming Language: Java
We recommend that you use Java to accomplish your project. Using Java will pay off in the second
part of your project. Make sure that Java 6 or 7 is installed on your machine. To find out which version
of Java you have installed, use this command:
java -version
If this command produces an error, make sure that your environmental variable PATH is set correctly
(http://java.com/en/download/help/path.xml).
To avoid running into unexpected issues, make sure that the environmental variable JAVA HOME is set
and pointing to the installation path of java. To verify this, this command should start Java:
Windows:
Linux:
%JAVA HOME%\bin\java -version
${JAVA HOME}/bin/java -version
IDE: Eclipse
We recommend that you use Eclipse IDE for development. As this is going to be a web-based project,
you should download the Eclipse for Java EE Developers. This can be downloaded from here:
http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigosr1
Web-Container: Tomcat
We recommend that you use Tomcat as the Web Server for your project as it has excellent Eclipse
integration. To install Tomcat support in Eclipse, you will need to go into Eclipse’s Preferences, under
Server, Runtime Environments, and click Add, as shown in the screenshots below. Select Apache Tomcat
7.0, and on the next dialog click “Download and Install”. Continue by selecting the location where you
want tomcat to be installed. Wait some time for Tomcat to be downloaded and then the “Finish” option
will be available. Some Mac OS X Eclipse distributions cannot download Tomcat automatically. In these
cases you can previously download Tomcat from http://tomcat.apache.org/download-70.cgi.
Figure 1: Adding the Tomcat 7.0 Runtime in Eclipse
Database: MySQL
Install and start MySQL on your machine. Log in into MySQL as root:
mysql -u root
Add a new user and a new database. Give the new user privileges to read and write to the database:
create user [email protected] identified by ’1234’;
create database dmdb2014;
grant all on dmdb2014.* to [email protected];
quit;
Compile and Deploy the Skeleton Project
The last step is to import the skeleton project into Eclipse and run it. Download the project archive
from the course web site.
In your Eclipse, use File→Import dialog, select General: Existing Projects into Workspace. Point
eclipse to the given archive file and click Finish.
To run the project, select Run→Run from Eclipse’s menu bar. You should select “Run on Server”,
and then use the existing Tomcat 7 Runtime. To verify that the project is running, use a web browser
and visit this URL:
http://localhost:8080/IntroDBProject
At this point you should be presented with the skeleton of the project. Play around with it and
you will notice that a couple of things are missing. Examine the source code of the skeleton application. The skeleton provides a couple of useful utilities for simplifying the creation of HTML, like the
BeanTableHelper. Please note that generating fancy HTML with nice effects is not part of this project.
You should try to keep the presentation as simple as possible.
Page 2
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement