#!/usr/bin/perl -w
use JavaTestingApplic;
use strict;
#use CGI;
use CGI::Safe;

#my $query = new CGI;
my $query = CGI::Safe->new;

# base directory for templates
my $tpath = "/mnt/web/nonpublic/javatest/templates";

my $language=$query->param('lang');

if ($language eq 'en'){
    my  $app = JavaTestingApplic->new(
				TMPL_PATH =>"$tpath/en/");
    $app->run();
}
if ($language eq 'es'){
    my  $app = JavaTestingApplic->new(
				TMPL_PATH =>"$tpath/es/");
    $app->run();
}
if ($language eq 'fi'){
    my  $app = JavaTestingApplic->new(
				TMPL_PATH =>"$tpath/fi/");
    $app->run();
}
#The first time the application is run, it has no path yet.
else {
    my  $app = JavaTestingApplic->new(
				TMPL_PATH =>"$tpath/");
    $app->run();
}


