#!/usr/bin/perl
#
#  PROGRAM:	sessionid.pl
#
#  PURPOSE:	Prints the jsessionid of the user
#

#------------------------------#
#  1. Create a new CGI object  #
#------------------------------#

use CGI;
$query = new CGI;


#--------------------------------------------------------------#
#  2. Create the HTTP header and print the doctype statement.  #
#--------------------------------------------------------------#

print $query->header;


#----------------------------------------------------#
#  3. Start the HTML doc, and give the page a title  #
#----------------------------------------------------#

print $query->start_html('JSESSIONID');


#----------------------------------------------------------------------#
#  4. Retrieve the cookie. Do this by using the cookie method without  #
#     the -value parameter.                                            #
#----------------------------------------------------------------------#


print $query->h3('Ihre aktuelle JSESSIONID lautet:');
$theCookie = $query->cookie('JSESSIONID'); 
print "

    \n"; print $theCookie; print "

\n";

#-------------------------#
#  5. End the HTML page.  #
#-------------------------#

print $query->end_html;
