Tech Blog

Voyager Dynamic Maps

  • Description: Java 6 Tomcat 6 based dynamic map application. Distributed as a war file.
  • Author: Erik Mallory
  • Additional author(s):
  • Institution:
    Wichita State University
  • Year: 2008
  • License: BSD style
  • Short description: Use, modification and distribution of the code are permitted provided the copyright notice, list of conditions and disclaimer appear in all related material.
  • Link to terms: Detailed license terms
  • Skill required for using this code:
    Choose one of the following: basic, intermediate, advanced, expert. Please also add your choice as a tag at the bottom of the page.

State

‘In Development’

Programming language

java/jsp

Software requirements

Java 6 Tomcat 6

Changes

Version 1.2 ….

Added sms texting capability.

Version 1.1 ….

The first stable version.

Installation instructions

Installation prerequisites:
You will need to know what operating system your Voyager Server is on.
(Windows or Solaris)
Java jdk 1.5 installed on Voyager Server. Download it here.https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=java_ee_sdk-5_01-oth-JPR%40CDS-CDS_Developer

Install Tomcat 6. You can download it fromhttp://tomcat.apache.org/download-60.cgi

Installing:

Install directories: (We run solaris at WSU so all of instructions are
for UNIX environments)
All text with a “prompt>” at the beginning of the line are unix commands

Java install directory (will now be referred to as JAVA_HOME)
/usr/java/jdk/jdk-1.5_10 (the last two digits may vary)

#As a privileged user (root) make the directory if it does not exist and
move the downloaded file to said directory.

prompt> mkdir /usr/java
prompt> mv /path/to/jdk.1.5_10.bin /usr/java

#make the downloaded java file executable and execute

prompt> chmod 700 /path/to/jdk.1.5_10.bin
prompt> cd /usr/java
prompt> ./jdk.1.5_10.bin

#follow the on screen instructions.

  1. After java 1.5 is installed Edit the ~/.profile file add the line:
    AVA_HOME=/usr/java/jdk/jdk-1.5_10
    prompt> vi \~/.profile

Install tomcat

Tomcat install directory (will now be referred to as CATALINA_HOME)
/m1/shared/tomcat6

prompt> cd /m1/shared
prompt> gzcat /path/to/tomcat-6.xx.xx.tar.gz \| tar xvf -
prompt> mv tomcat-6.xx.xx tomcat6

Configuring Tomcat:
Create an initiation script for stopping and starting tomcat

vi /etc/init.d/tomcat

Copy text between the “cut” tags and paste it in the new init script.
Note that you will have to change the JAVA_HOME variable to where your
JAVA_HOME is (in this example /usr/java/jdk/jdk-1.5_10)

\#\!/bin/sh
# Tomcat Startup Script

CATALINA_HOME=/m1/shared/tomcat6; export CATALINA_HOME
JAVA_HOME=/usr/java/jdk/jdk-1.5_10; export JAVA_HOME
TOMCAT_OWNER=voyager; export TOMCAT_OWNER

start() {
echo \-n "Starting Tomcat:  "
cd $CATALINA_HOME
su $TOMCAT_OWNER \-c $CATALINA_HOME/bin/startup.sh
sleep 2
}
stop() {
echo \-n "Stopping Tomcat: "
su $TOMCAT_OWNER \-c $CATALINA_HOME/bin/shutdown.sh
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
\*)
echo $"Usage: tomcat {start|stop|restart}"
exit
esac

#Make the script executable.

prompt> chmod 700 /etc/init.d/tomcat
\#Start tomcat with
prompt> /etc/init.d/tomcat start

And now finally installing dynamic maps:

Be sure your .profile is set up to use java.
prompt> vi ~/.profile
#Look for a line like JAVA_HOME=/usr/java/jdk/jdk-1.5.0_10
#and
PATH=$JAVA_HOME/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/local/sbin:
$PATH

Download Dynamic Maps (link above)
Then do the following:

prompt> cp libmaps-0.1.2.war /m1/shared/tomcat6/webapps
prompt> cd /m1/shared/tomcat6/webapps
prompt> jar \-xvf libmaps-0.1.2.war

#this will create a directory called libmaps-0.1.2 change the name to
#something more intuitive like “maps”

prompt> mv libmaps-0.1.2 maps
  1. restart tomcat
    /etc/init.d/tomcat restart

If all went well you should be able to use a web browser and navigate tohttp://voyager.yourschool.edu:8080/maps/admin
and there you will be able to login as “mapadmin” with the password
“changeme”
From there you will need to edit your system information under the
system link
data base server
data base port
data base SID
oracle user
oracle user password
smtp server

The google maps key is some thing you need to set up with google. You
have to register with your server with google and they give you a “key”
that you paste in the google maps key text field

After you have made all the changes you need then click save.

Adding a map:

Click on maps click add new map fill out the fields and upload a map
image.

Testing
if you click on test and inter in a Bib ID you can see if its working.

Using http://voyager.yourschool.edu:8080/maps/?bbid=5515

 

Leave a Reply