tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Buglass <adam.bugl...@ncl.ac.uk>
Subject RE: Problems with JSP pages.
Date Fri, 30 Apr 2004 11:14:49 GMT
I don't see anything immediately obvious. The only thing I can possibly
think of is that when you declare the String array:

String[] userSys   = new String[noReccount];   //Holds the names of the
systems

Try declaring it like 
String[noReccount+1000]; so that you're using an array larger than you
could possibly need.
The other thing I can think of is to use a Vector instead and convert it
to an array when you come out of the loop. As Vectors are elastic you
won't risk dropping off the end of one.

I'm not sure why this would work in one dir and not in another though.

Sorry, I think that's the best I can do right now.

Ad



On Fri, 2004-04-30 at 11:25, Thomas, Kevin [OS-IE] wrote:
> Adam,
> 
> Sure thing...'scuse the length of the message, one of the files contains a
> fair bit of javascript too. File one is the one that I'm having the problems
> with. It works in one directory and not in another??
> 
> File one:
> ---------
> <html>
> <head>
> <title>DORIS - MPAS Acknowledgement Checking</title>
> <style type="text/css" media="screen">
> @import "./css/layout4.css";
> <meta name="generator" content="Namo WebEditor v5.5">
> </style>
> <script language="JavaScript" src="overlib_mini.js"></script>
> </head>
> 
> <body>
> 
> <%@ include file="./header.jsp" %>
> <!-- KMT add details for embedded Java (JSP) -->
> <%@page import="java.sql.*" %>
> <%@page import="java.lang.*" %>
> 
> <!--
>  SCRIPT NAME: ack_index.jsp
>  DESCRIPTION: This is the acknowledgement checking main page.
> 
> DESIGN:
>  List to registered users, the available systems to report on
> 
> NOTE:
> 
>  Class files stored within 10.235.100.3:8080/de_reg/classes
> 
>  HISTORY
>  =======
>  21-FEB-03      K Thomas            V1.0  Creation
> 
> -->
> <!-- Original:  James O'Connor (joconnor@nordenterprises.com) -->
> <!-- Web Site:  http://nordenterprises.com -->
> <script language="JavaScript">
> <!-- Original:  Kedar R. Bhave (softricks@hotmail.com) -->
> <!-- Web Site:  http://www.softricks.com -->
> <!-- modifications and customizations to work with the "overLIB" library:
> -->
> <!-- Author:   James B. O'Connor (joconnor@nordenterprises.com) -->
> <!-- Web Site: http://www.nordenterprises.com -->
> <!-- developed for use with http://home-owners-assoc.com -->
> <!-- Note: while overlib works fine with Netscape 4, this function does not
> work very well, since portions of the "over" div -->
> <!--   end up under other fields on the form and cannot be seen.  If you
> really want to use this with NS4, -->
> <!--   you'll need to change the positioning in the overlib() call to make
> sure the "over" div gets positioned -->
> <!--   away from all other form fields -->
> <!-- you can get overLIB from: -->
> //\  overLIB 3.50  --  This notice must remain untouched at all times.
> //\  Copyright Erik Bosrup 1998-2001. All rights reserved.
> //\  By Erik Bosrup (erik@bosrup.com).  Last modified 2001-08-28.
> //\  Portions by Dan Steinman (dansteinman.com). Additions by other people
> are
> //\  listed on the overLIB homepage.
> //\  Get the latest version at http://www.bosrup.com/web/overlib/
> 
> var weekend = [0,6];
> var weekendColor = "#99CCFF";
> var fontface = "Verdana";
> var fontsize = 8;                       // in "pt" units; used with
> "font-size" style element
> 
> var gNow = new Date();
> var ggWinContent;
> var ggPosX = -1;
> var ggPosY = -1;
> 
> Calendar.Months = ["January", "February", "March", "April", "May", "June",
> "July", "August", "September", "October", "November", "December"];
> 
> // Non-Leap year Month days..
> Calendar.DOMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
> // Leap year Month days..
> Calendar.lDOMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
> 
> function Calendar(p_item, p_month, p_year, p_format) {
>         if ((p_month == null) && (p_year == null))      return;
> 
>         if (p_month == null) {
>                 this.gMonthName = null;
>                 this.gMonth = null;
>                 this.gYearly = true;
>         } else {
>                 this.gMonthName = Calendar.get_month(p_month);
>                 this.gMonth = new Number(p_month);
>                 this.gYearly = false;
>         }
> 
>         this.gYear = p_year;
>         this.gFormat = p_format;
>         this.gBGColor = "#FFFFFF";
>         this.gFGColor = "#FFFFFF";
>         this.gTextColor = "#6699FF";
>         this.gHeaderColor = "#FFFFFF";
>         this.gReturnItem = p_item;
> }
> 
> Calendar.get_month = Calendar_get_month;
> Calendar.get_daysofmonth = Calendar_get_daysofmonth;
> Calendar.calc_month_year = Calendar_calc_month_year;
> 
> function Calendar_get_month(monthNo) {
>         return Calendar.Months[monthNo];
> }
> 
> function Calendar_get_daysofmonth(monthNo, p_year) {
>         /*
>         Check for leap year ..
>         1.Years evenly divisible by four are normally leap years, except
> for...
>         2.Years also evenly divisible by 100 are not leap years, except
> for...
>         3.Years also evenly divisible by 400 are leap years.
>         */
>         if ((p_year % 4) == 0) {
>                 if ((p_year % 100) == 0 && (p_year % 400) != 0)
>                         return Calendar.DOMonth[monthNo];
> 
>                 return Calendar.lDOMonth[monthNo];
>         } else
>                 return Calendar.DOMonth[monthNo];
> }
> 
> function Calendar_calc_month_year(p_Month, p_Year, incr) {
>         /*
>         Will return an 1-D array with 1st element being the calculated month
>         and second being the calculated year
>         after applying the month increment/decrement as specified by 'incr'
> parameter.
>         'incr' will normally have 1/-1 to navigate thru the months.
>         */
>         var ret_arr = new Array();
> 
>         if (incr == -1) {
>                 // B A C K W A R D
>                 if (p_Month == 0) {
>                         ret_arr[0] = 11;
>                         ret_arr[1] = parseInt(p_Year) - 1;
>                 }
>                 else {
>                         ret_arr[0] = parseInt(p_Month) - 1;
>                         ret_arr[1] = parseInt(p_Year);
>                 }
>         } else if (incr == 1) {
>                 // F O R W A R D
>                 if (p_Month == 11) {
>                         ret_arr[0] = 0;
>                         ret_arr[1] = parseInt(p_Year) + 1;
>                 }
>                 else {
>                         ret_arr[0] = parseInt(p_Month) + 1;
>                         ret_arr[1] = parseInt(p_Year);
>                 }
>         }
> 
>         return ret_arr;
> }
> 
> function Calendar_calc_month_year(p_Month, p_Year, incr) {
>         /*
>         Will return an 1-D array with 1st element being the calculated month
>         and second being the calculated year
>         after applying the month increment/decrement as specified by 'incr'
> parameter.
>         'incr' will normally have 1/-1 to navigate thru the months.
>         */
>         var ret_arr = new Array();
> 
>         if (incr == -1) {
>                 // B A C K W A R D
>                 if (p_Month == 0) {
>                         ret_arr[0] = 11;
>                         ret_arr[1] = parseInt(p_Year) - 1;
>                 }
>                 else {
>                         ret_arr[0] = parseInt(p_Month) - 1;
>                         ret_arr[1] = parseInt(p_Year);
>                 }
>         } else if (incr == 1) {
>                 // F O R W A R D
>                 if (p_Month == 11) {
>                         ret_arr[0] = 0;
>                         ret_arr[1] = parseInt(p_Year) + 1;
>                 }
>                 else {
>                         ret_arr[0] = parseInt(p_Month) + 1;
>                         ret_arr[1] = parseInt(p_Year);
>                 }
>         }
> 
>         return ret_arr;
> }
> 
> // This is for compatibility with Navigator 3, we have to create and discard
> one object before the prototype object exists.
> new Calendar();
> 
> Calendar.prototype.getMonthlyCalendarCode = function() {
>         var vCode = "";
>         var vHeader_Code = "";
>         var vData_Code = "";
> 
>         // Begin Table Drawing code here..
>         vCode += ("<div align=center><TABLE BORDER=1 BGCOLOR=\"" +
> this.gBGColor + "\" style='font-size:" + fontsize + "pt;'>");
> 
>         vHeader_Code = this.cal_header();
>         vData_Code = this.cal_data();
>         vCode += (vHeader_Code + vData_Code);
> 
>         vCode += "</TABLE></div>";
> 
>         return vCode;
> }
> 
> Calendar.prototype.show = function() {
>         var vCode = "";
> 
>         // build content into global var ggWinContent
>         ggWinContent += ("<FONT FACE='" + fontface + "' ><B>");
>         ggWinContent += (this.gMonthName + " " + this.gYear);
>         ggWinContent += "</B><BR>";
> 
>         // Show navigation buttons
>         var prevMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear,
> -1);
>         var prevMM = prevMMYYYY[0];
>         var prevYYYY = prevMMYYYY[1];
> 
>         var nextMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear,
> 1);
>         var nextMM = nextMMYYYY[0];
>         var nextYYYY = nextMMYYYY[1];
> 
>         // BGCOLOR on this line alters the background of the navigation
> links
>         ggWinContent += ("<TABLE WIDTH='100%' BORDER=1 CELLSPACING=0
> CELLPADDING=0 BGCOLOR='#CCCCCC' style='font-size:" + fontsize +
> "pt;'><TR><TD ALIGN=center>");
>         ggWinContent += ("[<A HREF=\"javascript:void(0);\" " +
>                 "onMouseOver=\"window.status='Go back one year'; return
> true;\" " +
>                 "onMouseOut=\"window.status=''; return true;\" " +
>                 "onClick=\"Build(" +
>                 "'" + this.gReturnItem + "', '" + this.gMonth + "', '" +
> (parseInt(this.gYear)-1) + "', '" + this.gFormat + "'" +
>                 ");" +
>                 "\">Year<<<\/A>]</TD><TD ALIGN=center>");
>         ggWinContent += ("[<A HREF=\"javascript:void(0);\" " +
>                 "onMouseOver=\"window.status='Go back one month'; return
> true;\" " +
>                 "onMouseOut=\"window.status=''; return true;\" " +
>                 "onClick=\"Build(" +
>                 "'" + this.gReturnItem + "', '" + prevMM + "', '" + prevYYYY
> + "', '" + this.gFormat + "'" +
>                 ");" +
>                 "\">Mon<<\/A>]</TD><TD ALIGN=center>");
>         ggWinContent += "       </TD><TD ALIGN=center>";
>         ggWinContent += ("[<A HREF=\"javascript:void(0);\" " +
>                 "onMouseOver=\"window.status='Go forward one month'; return
> true;\" " +
>                 "onMouseOut=\"window.status=''; return true;\" " +
>                 "onClick=\"Build(" +
>                 "'" + this.gReturnItem + "', '" + nextMM + "', '" + nextYYYY
> + "', '" + this.gFormat + "'" +
>                 ");" +
>                 "\">>Mon<\/A>]</TD><TD ALIGN=center>");
>         ggWinContent += ("[<A HREF=\"javascript:void(0);\" " +
>                 "onMouseOver=\"window.status='Go forward one year'; return
> true;\" " +
>                 "onMouseOut=\"window.status=''; return true;\" " +
>                 "onClick=\"Build(" +
>                 "'" + this.gReturnItem + "', '" + this.gMonth + "', '" +
> (parseInt(this.gYear)+1) + "', '" + this.gFormat + "'" +
>                 ");" +
>                 "\">>>Year<\/A>]</TD></TR></TABLE><BR>");
> 
>         // Get the complete calendar code for the month, and add it to the
>         //      content var
>         vCode = this.getMonthlyCalendarCode();
>         ggWinContent += vCode;
> }
> 
> Calendar.prototype.showY = function() {
>         var vCode = "";
>         var i;
> 
>         ggWinContent += "<FONT FACE='" + fontface + "' ><B>"
>         ggWinContent += ("Year : " + this.gYear);
>         ggWinContent += "</B><BR>";
> 
>         // Show navigation buttons
>         var prevYYYY = parseInt(this.gYear) - 1;
>         var nextYYYY = parseInt(this.gYear) + 1;
> 
>         //Not sure what BGCOLOR on this line does!
>         ggWinContent += ("<TABLE WIDTH='100%' BORDER=1 CELLSPACING=0
> CELLPADDING=0 BGCOLOR='#FFFFFF' style='font-size:" + fontsize +
> "pt;'><TR><TD ALIGN=center>");
>         ggWinContent += ("[<A HREF=\"javascript:void(0);\" " +
>                 "onMouseOver=\"window.status='Go back one year'; return
> true;\" " +
>                 "onMouseOut=\"window.status=''; return true;\" " +
>                 "onClick=\"Build(" +
>                 "'" + this.gReturnItem + "', null, '" + prevYYYY + "', '" +
> this.gFormat + "'" +
>                 ");" +
>                 "\"><<Year<\/A>]</TD><TD ALIGN=center>");
>         ggWinContent += "       </TD><TD ALIGN=center>";
>         ggWinContent += ("[<A HREF=\"javascript:void(0);\" " +
>                 "onMouseOver=\"window.status='Go forward one year'; return
> true;\" " +
>                 "onMouseOut=\"window.status=''; return true;\" " +
>                 "onClick=\"Build(" +
>                 "'" + this.gReturnItem + "', null, '" + nextYYYY + "', '" +
> this.gFormat + "'" +
>                 ");" +
>                 "\">Year>><\/A>]</TD></TR></TABLE><BR>");
> 
>         // Get the complete calendar code for each month.
>         // start a table and first row in the table
>         ggWinContent += ("<TABLE WIDTH='100%' BORDER=0 CELLSPACING=0
> CELLPADDING=5 style='font-size:" + fontsize + "pt;'><TR>");
>         var j;
>         for (i=0; i<12; i++) {
>                 // start the table cell
>                 ggWinContent += "<TD ALIGN='center' VALIGN='top'>";
>                 this.gMonth = i;
>                 this.gMonthName = Calendar.get_month(this.gMonth);
>                 vCode = this.getMonthlyCalendarCode();
>                 ggWinContent += (this.gMonthName + "/" + this.gYear +
> "<BR>");
>                 ggWinContent += vCode;
>                 ggWinContent += "</TD>";
>                 if (i == 3 || i == 7) {
>                         ggWinContent += "</TR><TR>";
>                         }
> 
>         }
> 
>         ggWinContent += "</TR></TABLE></font><BR>";
> }
> 
> Calendar.prototype.cal_header = function() {
>         var vCode = "";
> 
>         vCode = vCode + "<TR>";
>         vCode = vCode + "<TD WIDTH='14%'><FONT FACE='" + fontface + "'
> COLOR='" + this.gHeaderColor + "'><B>Sun</B></FONT></TD>";
>         vCode = vCode + "<TD WIDTH='14%'><FONT FACE='" + fontface + "'
> COLOR='" + this.gHeaderColor + "'><B>Mon</B></FONT></TD>";
>         vCode = vCode + "<TD WIDTH='14%'><FONT FACE='" + fontface + "'
> COLOR='" + this.gHeaderColor + "'><B>Tue</B></FONT></TD>";
>         vCode = vCode + "<TD WIDTH='14%'><FONT FACE='" + fontface + "'
> COLOR='" + this.gHeaderColor + "'><B>Wed</B></FONT></TD>";
>         vCode = vCode + "<TD WIDTH='14%'><FONT FACE='" + fontface + "'
> COLOR='" + this.gHeaderColor + "'><B>Thu</B></FONT></TD>";
>         vCode = vCode + "<TD WIDTH='14%'><FONT FACE='" + fontface + "'
> COLOR='" + this.gHeaderColor + "'><B>Fri</B></FONT></TD>";
>         vCode = vCode + "<TD WIDTH='16%'><FONT FACE='" + fontface + "'
> COLOR='" + this.gHeaderColor + "'><B>Sat</B></FONT></TD>";
>         vCode = vCode + "</TR>";
> 
>         return vCode;
> }
> 
> Calendar.prototype.cal_data = function() {
>         var vDate = new Date();
>         vDate.setDate(1);
>         vDate.setMonth(this.gMonth);
>         vDate.setFullYear(this.gYear);
> 
>         var vFirstDay=vDate.getDay();
>         var vDay=1;
>         var vLastDay=Calendar.get_daysofmonth(this.gMonth, this.gYear);
>         var vOnLastDay=0;
>         var vCode = "";
> 
>         /*
>         Get day for the 1st of the requested month/year..
>         Place as many blank cells before the 1st day of the month as
> necessary.
>         */
>         vCode = vCode + "<TR>";
>         for (i=0; i<vFirstDay; i++) {
>                 vCode = vCode + "<TD WIDTH='14%'" +
> this.write_weekend_string(i) + "><FONT FACE='" + fontface + "'>
> </FONT></TD>";
>         }
> 
>         // Write rest of the 1st week
>         for (j=vFirstDay; j<7; j++) {
>                 vCode = vCode + "<TD WIDTH='14%'" +
> this.write_weekend_string(j) + "><FONT FACE='" + fontface + "'>" +
>                         "<A HREF='javascript:void(0);' " +
>                                 "onMouseOver=\"window.status='set date to "
> + this.format_data(vDay) + "'; return true;\" " +
>                                 "onMouseOut=\"window.status=' '; return
> true;\" " +
>                                 "onClick=\"document." + this.gReturnItem +
> ".value='" +
>                                 this.format_data(vDay) +
>                                 "';ggPosX=-1;ggPosY=-1;nd();nd();\">" +
>                                 this.format_day(vDay) +
>                         "</A>" +
>                         "</FONT></TD>";
>                 vDay=vDay + 1;
>         }
>         vCode = vCode + "</TR>";
> 
>         // Write the rest of the weeks
>         for (k=2; k<7; k++) {
>                 vCode = vCode + "<TR>";
> 
>                 for (j=0; j<7; j++) {
>                         vCode = vCode + "<TD WIDTH='14%'" +
> this.write_weekend_string(j) + "><FONT FACE='" + fontface + "'>" +
>                                 "<A HREF='javascript:void(0);' " +
>                                         "onMouseOver=\"window.status='set
> date to " + this.format_data(vDay) + "'; return true;\" " +
>                                         "onMouseOut=\"window.status=' ';
> return true;\" " +
>                                         "onClick=\"document." +
> this.gReturnItem + ".value='" +
>                                         this.format_data(vDay) +
>  
> "';window.scroll(0,ggPosY);ggPosX=-1;ggPosY=-1;nd();nd();\">" +
>                                 this.format_day(vDay) +
>                                 "</A>" +
>                                 "</FONT></TD>";
>                         vDay=vDay + 1;
> 
>                         if (vDay > vLastDay) {
>                                 vOnLastDay = 1;
>                                 break;
>                         }
>                 }
> 
>                 if (j == 6)
>                         vCode = vCode + "</TR>";
>                 if (vOnLastDay == 1)
>                         break;
>         }
> 
>         // Fill up the rest of last week with proper blanks, so that we get
> proper square blocks
>         for (m=1; m<(7-j); m++) {
>                 if (this.gYearly)
>                         vCode = vCode + "<TD WIDTH='14%'" +
> this.write_weekend_string(j+m) +
>                         "><FONT FACE='" + fontface + "' COLOR='#999999'>
> </FONT></TD>";
>                 else
>                         vCode = vCode + "<TD WIDTH='14%'" +
> this.write_weekend_string(j+m) +
>                         "><FONT FACE='" + fontface + "' COLOR='#999999'>" +
> m + "</FONT></TD>";
>         }
> 
>         return vCode;
> }
> 
> Calendar.prototype.format_day = function(vday) {
>         var vNowDay = gNow.getDate();
>         var vNowMonth = gNow.getMonth();
>         var vNowYear = gNow.getFullYear();
> 
>         // the font colour here is used to highlight the current date
>         if (vday == vNowDay && this.gMonth == vNowMonth && this.gYear ==
> vNowYear)
>                 return ("<FONT COLOR=\"#FF0033\"><B>" + vday +
> "</B></FONT>");
>         else
>                 return (vday);
> }
> 
> Calendar.prototype.write_weekend_string = function(vday) {
>         var i;
> 
>         // Return special formatting for the weekend day.
>         for (i=0; i<weekend.length; i++) {
>                 if (vday == weekend[i])
>                         return (" BGCOLOR=\"" + weekendColor + "\"");
>         }
> 
>         return "";
> }
> 
> Calendar.prototype.format_data = function(p_day) {
>         var vData;
>         var vMonth = 1 + this.gMonth;
>         vMonth = (vMonth.toString().length < 2) ? "0" + vMonth : vMonth;
>         var vMon =
> Calendar.get_month(this.gMonth).substr(0,3).toUpperCase();
>         var vFMon = Calendar.get_month(this.gMonth).toUpperCase();
>         var vY4 = new String(this.gYear);
>         var vY2 = new String(this.gYear.substr(2,2));
>         var vDD = (p_day.toString().length < 2) ? "0" + p_day : p_day;
> 
>         switch (this.gFormat) {
>                 case "MM\/DD\/YYYY" :
>                         vData = vMonth + "\/" + vDD + "\/" + vY4;
>                         break;
>                 case "MM\/DD\/YY" :
>                         vData = vMonth + "\/" + vDD + "\/" + vY2;
>                         break;
>                 case "MM-DD-YYYY" :
>                         vData = vMonth + "-" + vDD + "-" + vY4;
>                         break;
>                 case "YYYY-MM-DD" :
>                         vData = vY4 + "-" + vMonth + "-" + vDD;
>                         break;
>                 case "MM-DD-YY" :
>                         vData = vMonth + "-" + vDD + "-" + vY2;
>                         break;
>                 case "DD\/MON\/YYYY" :
>                         vData = vDD + "\/" + vMon + "\/" + vY4;
>                         break;
>                 case "DD\/MON\/YY" :
>                         vData = vDD + "\/" + vMon + "\/" + vY2;
>                         break;
>                 case "DD-MON-YYYY" :
>                         vData = vDD + "-" + vMon + "-" + vY4;
>                         break;
>                 case "DD-MON-YY" :
>                         vData = vDD + "-" + vMon + "-" + vY2;
>                         break;
>                 case "DD\/MONTH\/YYYY" :
>                         vData = vDD + "\/" + vFMon + "\/" + vY4;
>                         break;
>                 case "DD\/MONTH\/YY" :
>                         vData = vDD + "\/" + vFMon + "\/" + vY2;
>                         break;
>                 case "DD-MONTH-YYYY" :
>                         vData = vDD + "-" + vFMon + "-" + vY4;
>                         break;
>                 case "DD-MONTH-YY" :
>                         vData = vDD + "-" + vFMon + "-" + vY2;
>                         break;
>                 case "DD\/MM\/YYYY" :
>                         vData = vDD + "\/" + vMonth + "\/" + vY4;
>                         break;
>                 case "DD\/MM\/YY" :
>                         vData = vDD + "\/" + vMonth + "\/" + vY2;
>                         break;
>                 case "DD-MM-YYYY" :
>                         vData = vDD + "-" + vMonth + "-" + vY4;
>                         break;
>                 case "DD-MM-YY" :
>                         vData = vDD + "-" + vMonth + "-" + vY2;
>                         break;
>                 default :
>                         vData = vMonth + "\/" + vDD + "\/" + vY4;
>         }
> 
>         return vData;
> }
> 
> function Build(p_item, p_month, p_year, p_format) {
>         gCal = new Calendar(p_item, p_month, p_year, p_format);
> 
>         // Customize your Calendar here..
> 	// first of all, the background colour
>         gCal.gBGColor="#FFFFFF";
> 	// not sure what this one does, changed it with no effect
>         gCal.gLinkColor="#FFFFFF";
> 	// again, changed this without any effect
>         gCal.gTextColor="#CC66FF";
> 	// this changes the colour of the days of the week
>         gCal.gHeaderColor="#999999";
> 
>         // initialize the content string
>         ggWinContent = "";
> 
>         // Choose appropriate show function
>         if (gCal.gYearly) {
>                 // and, since the yearly calendar is so large, override the
> positioning and fontsize
>                 // warning: in IE6, it appears that "select" fields on the
> form will still show
>                 //      through the "over" div; Note: you can set these
> variables as part of the onClick
>                 //      javascript code before you call the
> show_yearly_calendar function
>                 if (ggPosX == -1) ggPosX = 10;
>                 if (ggPosY == -1) ggPosY = 10;
>                 if (fontsize == 8) fontsize = 6;
>                 // generate the calendar
>                 gCal.showY();
>                 }
>         else {
>                 gCal.show();
>                 }
> 
>         // if this is the first calendar popup, use autopositioning with an
> offset
>         if (ggPosX == -1 && ggPosY == -1) {
>                 overlib(ggWinContent, AUTOSTATUSCAP, STICKY, CLOSECLICK,
> CSSSTYLE,
>                         TEXTSIZEUNIT, "pt", TEXTSIZE, 8, CAPTIONSIZEUNIT,
> "pt", CAPTIONSIZE, 8, CLOSESIZEUNIT, "pt", CLOSESIZE, 8,
>                         CAPTION, " ", OFFSETX, 20, OFFSETY, -20);
>                 // save where the 'over' div ended up; we want to stay in
> the same place if the user
>                 //      clicks on one of the year or month navigation links
>                 if ( (ns4) || (ie4) ) {
>                         ggPosX = parseInt(over.left);
>                         ggPosY = parseInt(over.top);
>                         } else if (ns6) {
>                         ggPosX = parseInt(over.style.left);
>                         ggPosY = parseInt(over.style.top);
>                         }
>                 }
>         else {
>                 // we have a saved X & Y position, so use those with the
> FIXX and FIXY options
>                 overlib(ggWinContent, AUTOSTATUSCAP, STICKY, CLOSECLICK,
> CSSSTYLE,
>                         TEXTSIZEUNIT, "pt", TEXTSIZE, 8, CAPTIONSIZEUNIT,
> "pt", CAPTIONSIZE, 8, CLOSESIZEUNIT, "pt", CLOSESIZE, 8,
>                         CAPTION, " ", FIXX, ggPosX, FIXY, ggPosY);
>                 }
>         window.scroll(ggPosX, ggPosY);
> }
> 
> function show_calendar() {
>         /*
>                 p_month : 0-11 for Jan-Dec; 12 for All Months.
>                 p_year  : 4-digit year
>                 p_format: Date format (mm/dd/yyyy, dd/mm/yy, ...)
>                 p_item  : Return Item.
>         */
> 
>         p_item = arguments[0];
>         if (arguments[1] == null)
>                 p_month = new String(gNow.getMonth());
>         else
>                 p_month = arguments[1];
>         if (arguments[2] == "" || arguments[2] == null)
>                 p_year = new String(gNow.getFullYear().toString());
>         else
>                 p_year = arguments[2];
>         if (arguments[3] == null)
>                 p_format = "DD-MON-YYYY";
>         else
>                 p_format = arguments[3];
> 
>         Build(p_item, p_month, p_year, p_format);
> }
> /*
> Yearly Calendar Code Starts here
> */
> function show_yearly_calendar() {
>         // Load the defaults..
>         //if (p_year == null || p_year == "")
>         //      p_year = new String(gNow.getFullYear().toString());
>         //if (p_format == null || p_format == "")
>         //      p_format = "YYYY-MM-DD";
> 
>         p_item = arguments[0];
>         if (arguments[1] == "" || arguments[1] == null)
>                 p_year = new String(gNow.getFullYear().toString());
>         else
>                 p_year = arguments[1];
>         if (arguments[2] == null)
>                 p_format = "YYYY-MM-DD";
>         else
>                 p_format = arguments[2];
> 
>         Build(p_item, null, p_year, p_format);
> }
> </script>
> <script language="JavaScript" src="overlib_mini.js"></script>
>   
> <!-- ==================== --> 
> <!--  START OF PAGE HTML  -->
> <!-- ==================== --> 
> <div class="content">
>     <h2>Acknowledgement Reporting</h2>
>  
>     <h4>Select an application from the 1st drop down list.<br>
>     Then select a report to run from the second.<br>
>     The reports currently available are:<br><br>
>     </h4>
> <h5>
>     Matched/Unmatched counts - Provides a count of all files matched and
> unmatched<br>
>     Matched Details - Provides a breakdown on all files matched between the
> selected dates<br>
>     Unmatched Details - Provides a list of all unmatched files between the
> selected dates<br>
>     </h5>
>     <h4>
>     <!-- 
>       Put a bit of JSP in here to determine who is logged in
>       and what role they have. This will determine what systems
>       they can view.
>     -->
> 
>     <% //This returns the current role for the use logged in. This enables
> the
>        //front page options to be tailored to their specific Business group.
> 	     
> 	   //Create a new connection object
> 	   Connection conn = null;
> 	   try
> 	   {
> 	     String currUser;      //Stores the id of the currently logged
> in user
> 	     String currName;      //Stores the full name of the logged in
> user
> 	     int noReccount = 0;   //Store the number of records returned
> from a query
> 	     int noRecs = 0;       //Stores the number of records returned
> in a later query
> 	     int i = 0;            //Store an incremented value for use in a
> loop
> 	     
> 	     //Get the current user ID
> 	     currUser = request.getRemoteUser();
> 	     
> 	     //Use the Oracle JDBC driver
> 	     Class.forName("oracle.jdbc.driver.OracleDriver");
> 
> 	     //Register the driver for use
> 	     DriverManager.registerDriver(new
> oracle.jdbc.driver.OracleDriver());
> 	     
> 	     //Make a new connection to DORIS
> 	     conn = DriverManager.getConnection(
> 	               "jdbc:oracle:thin:@<ip>:<port>:<db>",
> 	               "<user>",
> 	               "<pass>");
> 			
> 	     //Create a new statement for executing against the DB
> 	     Statement stmt = conn.createStatement();
> 
> 	     //Get a count of the systems that the user has access to.
> 	     ResultSet rsCount = stmt.executeQuery("SELECT COUNT( DISTINCT(
> vcs.system ) ) "+
> 	                                           "  FROM smut_users su "+
> 					           "      ,v_check_systems
> vcs "+
> 					           " WHERE user_name =
> '"+currUser+"'"+
> 					           "   AND
> vcs.business_group LIKE DECODE( su.business_group, 'SAIC', '%',
> su.business_group ) ");
> 
> 	     //This function somehow ensures that the query returns the
> correct info
> 	     rsCount.next();          		
> 	     
> 	     //Get the count of records
> 	     noReccount = rsCount.getInt(1);
> 	     
> 	     //Close the statement
> 	     rsCount.close();
> 	     
> 	     //Now run another query to pull back the role names for the
> current user
> 	     ResultSet rs = stmt.executeQuery("SELECT su.user_fullname "+
> 	                                      "      ,su.business_group "+
> 					      "      ,vcs.system "+
> 	                                      "  FROM smut_users su "+
> 					      "      ,v_check_systems vcs "+
> 					      " WHERE user_name =
> '"+currUser+"'"+
> 					      "   AND vcs.business_group
> LIKE DECODE( su.business_group, 'SAIC', '%', su.business_group ) ");
> 					      
>              //Setup some arrays and variables to hold info returned from
> the query above
> 	     String[] userSys   = new String[noReccount];   //Holds the
> names of the systems
>              String   userBG    = "";                       //Holds the
> current users business group
> 	     String   userFN    = "";                       //Holds the
> current users full name
> 	 
> 	     //Loop through the results of the query and populate the array
> with the results
> 	     while(rs.next())
> 	     {
> 	       //Populate the array
> 	       userSys[i]  = rs.getString(3);
> 	       
>                //Store the users name and business group
>  	       userFN = rs.getString(1);
> 	       userBG = rs.getString(2);
> 	       
> 	       //Increment the counter
>                i = i + 1;
> 	     }
> 	     
> 	     //Reset the counter
> 	     i = 0;
> 	     
> 	     //Close the statement
> 	     rs.close();
> 	     
> 	     //Setup the dropdown list with the returned systems
> 	     out.println( "<form NAME=\"form1\" METHOD=\"POST\">" );
> 	     out.println( "<table cellspacing=\"0\">" );
>              out.println( "<tr class=\"required\">" );
>              out.println( "<td class=\"lbl\" width=\"65\">System:</td>" );
>              out.println( "<td class=\"inp\" width=\"234\"><select
> NAME=\"dd1\" SIZE=1>" );
> 
>              //Populate the dropdown list with the systems retrieved
> 	     //earlier.
> 	     do
> 	     {
>                out.println( "<option value=\""+userSys[i]+"\">");
>                out.println( userSys[i] );
> 	       
> 	       //Increment the counter
> 	       i = i + 1;
> 	       
> 	     } while ( i < noReccount );
> 
>              out.println( "</option>" );
>              out.println( "</select></td>" );
> 	     out.println( "</tr>" );
> 	     out.println( "</table>" );
> 	     out.println( "</form>" );
>             // out.println( "</div>" );
> 	     	     
> 	   }
> 	   catch(SQLException e)
> 	   {
> 	      out.println("SQLException: " + e.getMessage() + "<BR>");
> 	      while((e = e.getNextException()) != null)
> 	         out.println(e.getMessage() + "<BR>");
> 	   }
> 	   catch(ClassNotFoundException e)
> 	   {
> 	      out.println("ClassNotFoundException: " + e.getMessage() +
> "<BR>");
> 	   }
> 	   finally
> 	   {
> 	      //Clean up resources, close the connection.
> 	      if(conn != null)
> 	      {
> 	         try
> 	         {
> 	            conn.close();
> 	         }
> 	         catch (Exception ignored) {}
> 	      }
> 	   }
> 	%>   
>                    
>   </h4>
>     
> <form NAME="form2" METHOD="POST">
>     <table cellspacing="0">
>       <tr class="required">
>         <td class="lbl">Report Type:</td>
>         <td class="inp"><select NAME="dd2" SIZE=1>
> 
>           <option value="A">
>             Matched/Unmatched Counts
>           </option>
> 
>           <option value="B">
>             Matched Details
>           </option>
> 
>           <option value="C">
>             Unmatched Details
>           </option>
>           </select>
> 	</td>
>       </tr>
>     </table>
>   </form>
>   <div id="overDiv" style="width:200px; height:200px; position:absolute;
> left:50px; top:50px; z-index:1000; visibility:hidden;">
>         <p>&nbsp;</p>
>   </div> 
>   <form name="datepicker" method="post" action="popupcalsample.html"> 
>     <table cellspacing="0" width="378">
>       <tr class="required">
>         <td class="lbl" width="65">Start Date:</td>
>         <td class="inp" width="309"><input type="text" name="T1" size="20">
> 	  <a href="javascript:show_calendar('datepicker.T1');"
> onMouseOver="window.status='Date Picker'; overlib('Click here to choose a
> date from a one month pop-up calendar.'); return true;"
> onMouseOut="window.status=''; nd(); return true;"><img
> src="images/show-calendar.gif" width=24 height=22 border=0></a> 
>                     <input type="reset" value="Reset" name="B2">
> 	</td>
>       </tr>
>       <tr class="required">
>         <td class="lbl" width="65">End Date:</td>
>         <td class="inp" width="309"><input type="text" name="T2" size="20">
>           <a href="javascript:show_calendar('datepicker.T2');"
> onMouseOver="window.status='Date Picker'; overlib('Click here to choose a
> date from a one month pop-up calendar.'); return true;"
> onMouseOut="window.status=''; nd(); return true;"><img
> src="images/show-calendar.gif" width=24 height=22 border=0></a> 
>                     <input type="button" onClick= "location =
> 'http://10.235.100.3:8080/powersystems/poll_stats.jsp?userChoice='+
> document.form2.dd2.options[document.form2.dd2.selectedIndex].value +
> '&sysName=' +
> document.form1.dd1.options[document.form1.dd1.selectedIndex].value +
> '&startDate='+ document.datepicker.T1.value + '&endDate='+
> document.datepicker.T2.value;" value="GO">
> 	</td>
>       </tr>
>     </table>
>   </form>
> </div>
>  </body>
> </html>
> 
> 
> FILE TWO:
> ---------
> <html>
>   <head>
>     <title>DORIS - Acknowledgement Processing</title>
>     <style type="text/css" media="screen">
>       @import "./css/layout4.css";
>       <meta name="generator" content="Namo WebEditor v5.5">
>     </style>
>   </head>
>   <body>
>     <!-- Ensure the header is created -->
>     <%@ include file="./header.jsp" %>
>     
>     <!-- KMT add details for embedded Java (JSP) -->
>     <%@page import="java.sql.*" %>
>     <%@page import="java.lang.*" %>
>     <%@page import="java.io.*" %>
>     <%@page import="java.util.*" %>
>     <%@page import="javax.servlet.http.*" %>
>     <%@page import="javax.servlet.*" %>
>     
>     <!-- SCRIPT NAME: poll_stats.jsp
>          DESCRIPTION: This page displays the selected details on
> 	              stats gathered by the file ack processor.
> 
>          DESIGN:
>          This page is called from the ack_index.jsp. Registered
> 	 users are shown systems to which they have access. From
> 	 these, they can chose to view a report to display
> 	 certain statistics gathered in the DORIS database.
> 
>          NOTE:
>          This jsp page supersedes the POLL_STATS.java file that
> 	 was originally used during demos.
> 
>          HISTORY
>          =======
>          21-FEB-03      K Thomas    V1.0  Creation
> 	 29-APR-04      K Thomas    V1.1  Modified to turn .java into a .jsp
>     -->
>     <% //This returns the current role for the use logged in. This enables
> the
>        //front page options to be tailored to their specific Business group.
> 	     
>        //Create a new connection object
>        Connection conn = null;
>        try
>        {
>          String userChoice;    //Stores the value relating to the report
> option the user has selected
>          String sysName;       //Stores the name of the system for which the
> report is being generated
>          String startDate;     //Stores the start date of the reporting
> period
>          String endDate;       //Stores the end date of the reporting period
>          String lastFileid;    //Stores the fileid of the last item checked
> (to allow for colour highlighting)
> 	 String bgColor;       //Stores the colour to be applied to the
> returned report list row
>          int noReccount = 0;   //Store the number of records returned from a
> query
>          int noRecs = 0;       //Stores the number of records returned in a
> later query
>          int i = 0;            //Store an incremented value for use in a
> loop
>           
>          //Use the Oracle JDBC driver
>          Class.forName("oracle.jdbc.driver.OracleDriver");
>     
>          //Register the driver for use
>          DriverManager.registerDriver(new
> oracle.jdbc.driver.OracleDriver());
>      
>          //Make a new connection to DORIS
>          conn = DriverManager.getConnection(
> "jdbc:oracle:thin:@<ip>:<port>:<db>",
>                                              "<user>",
>                                              "<pass>");
> 			
>          //Create a new statement for executing against the DB
>          Statement stmt = conn.createStatement();
> 	 
> 	 /*
>          ||
>          || Get the value for the system parameter. This will either be
>          ||
>          || a) Summary Page          (parameter value = A)
>          || b) Matched Files         (    "       "   = B)
>          || c) Unmatched Files       (    "       "   = c)
>          ||
>          */
>          userChoice = request.getParameter("userChoice");   // accept the
> users option as a parameter
>          sysName    = request.getParameter("sysName");      // accept the
> system name the user wants to look at
>          startDate  = request.getParameter("startDate");    // accept the
> start date for the report range
>          endDate    = request.getParameter("endDate");      // accept the
> end date for the report range
> 
>          /*
>          ||
>          || Send parameters to server output for debug purposes
>          ||
>          */
>          System.out.println( " Processing info : userChoice = " + userChoice
> );
>          System.out.println( " Processing info : dbLink     = " + sysName
> );
>          System.out.println( " Processing info : startDate  = " + startDate
> );
>          System.out.println( " Processing info : endDate    = " + endDate
> );
> 	
> 	 /*
>          ||
>          || If the user has selected A then run the query to show
>          || the current matched/unmatched totals.
>          ||
>          */
>          if ( userChoice.equals( "A" ) )
>          {
> 
>            /*
>            ||
>            || Reset the colour
>            ||
>            */
>            bgColor = "#FFFFFF";
> 
>            out.println("<h2 align=center><b>Polled File
> Statistics</b></h2>"+
>                        "<h2 align=center><b><i>"+sysName+"</i></b></h2>"+
>                        "<h3 align=center><b>Matched/Unmatched
> Counts</b></h2>"+
>                        "<hr>"
>                       );
> 
>            ResultSet rs = stmt.executeQuery("SELECT system" +
>                                             "      ,TO_CHAR( dtime,
> 'DD-MON-YYYY' ) dtime" +
>                                             "      ,SUM( DECODE( status,
> 'M', 1, 0 ) ) matched" +
>                                             "      ,SUM( DECODE( status,
> 'L', 1, 0 ) ) unmatched" +
>                                             "  FROM poll_file_log" +
>                                             " WHERE system = '"+sysName+"'"
> +
>                                             "   AND TRUNC( dtime ) BETWEEN
> DECODE( TO_DATE( '"+startDate+"', 'DD-MON-YYYY' ), NULL, TRUNC( SYSDATE - 1
> ), TO_DATE( '"+startDate+"', 'DD-MON-YYYY' ) )" +
>                                             "                          AND
> DECODE( TO_DATE( '"+endDate+"', 'DD-MON-YYYY' ), NULL, TRUNC( SYSDATE ),
> TO_DATE( '"+endDate+"', 'DD-MON-YYYY' ) )"+
>                                             " GROUP BY system" +
>                                             "      ,TO_CHAR( dtime,
> 'DD-MON-YYYY' ) "
>                                            );
> 
>            out.println("<table cellpadding=3 border=0 align=center>");
> 
>            out.println("<tr>" +
>                        "<td class=\"head\"><b>System &nbsp;</b></td>" +
>                        "<td class=\"head\"><b>Logged Date/Time</b></td>" +
>                        "<td class=\"head\"><b>Matched Count</b></td>" +
>                        "<td class=\"head\"><b>Unmatched Count</b></td>" +
>                        "</tr>"
>                       );
> 
>            while (rs.next())
>            {
> 
>              out.println("<tr bgcolor=\""+bgColor+"\">"+
>                          "<td class=\"data\">" + rs.getString(1) + "</td>" +
>                          "<td class=\"data\">" + rs.getString(2) + "</td>" +
>                          "<td class=\"data\">" + rs.getString(3) + "</td>" +
>                          "<td class=\"data\">" + rs.getString(4) + "</td>" +
>                          "</tr>"
>                         );
>            }
>            out.println("</table>");
>          }    //close option A
> 
>          /*
>          ||
>          || If the user has selected B then run the query to show
>          || the current matched file details
>          ||
>          */
>          if ( userChoice.equals( "B" ) )
>          {
> 
>            /*
>            ||
>            || Reset any variables
>            */
>            lastFileid = "";
> 
>            /*
>            ||
>            || Reset the colour
>            ||
>            */
>            bgColor = "#FFFFFF";
> 
>            out.println("<h2 align=center><b>Polled File
> Statistics</b></h2>"+
>                        "<h2 align=center><b><i>"+sysName+"</i></b></h2>"+
>                        "<h3 align=center><b>Matched File Details</b></h2>"+
>                        "<hr>"
>                       );
> 
> 
>            ResultSet rs = stmt.executeQuery("SELECT system" +
>                                             "      ,filename" +
>                                             "      ,fileid" +
>                                             "      ,flowid" +
>                                             "      ,sender" +
>                                             "      ,recipient" +
>                                             "      ,TO_CHAR( dtime,
> 'DD-MON-YYYY HH24:MI:SS' )" +
>                                             "      ,DECODE( filetype, 'A',
> 'Acknowledgement', 'O', 'Outgoing Flow', ' ' ) filetype" +
>                                             "      ,ackdesc" +
>                                             "      ,DECODE( ackstatus, 1,
> 'Success', 3, 'Failure', ' ' ) " +
>                                             "  FROM poll_file_log" +
>                                             " WHERE status = 'M'" +
>                                             "   AND system = '"+sysName+"'"+
>                                             "   AND TRUNC( dtime ) BETWEEN
> DECODE( TO_DATE( '"+startDate+"', 'DD-MON-YYYY' ), NULL, TRUNC( SYSDATE - 1
> ), TO_DATE( '"+startDate+"', 'DD-MON-YYYY' ) )" +
>                                             "                          AND
> DECODE( TO_DATE( '"+endDate+"', 'DD-MON-YYYY' ), NULL, TRUNC( SYSDATE ),
> TO_DATE( '"+endDate+"', 'DD-MON-YYYY' ) )"+
>                                             " ORDER BY FILEID "
>                                            );
> 
> 
>            out.println("<table cellpadding=3 border=0 align=center>");
> 
>            out.println("<tr>" +
>                        "<td
> align=center><u><small><small>System</small></small></u></td>" +
>                        "<td align=center><u><small><small>File
> Name</small></small></u></td>" +
>                        "<td align=center><u><small><small>File
> ID</small></small></u></td>" +
>                        "<td align=center><u><small><small>Flow
> ID</small></small></u></td>" +
>                        "<td
> align=center><u><small><small>Sender</small></small></u></td>" +
>                        "<td
> align=center><u><small><small>Recipient</small></small></u></td>" +
>                        "<td align=center><u><small><small>Logged
> Date/Time</small></small></u></td>" +
>                        "<td align=center><u><small><small>File
> Type</small></small></u></td>" +
>                        "<td align=center><u><small><small>Acknowledgement
> Desc</small></small></u></td>" +
>                        "</tr>"
>                       );
> 
>            while (rs.next())
>            {
> 
>              if ( rs.getString(3).equals( lastFileid ) )
>              {
> 	       bgColor = "#99CCFF";
>              }
> 
>              if ( rs.getString(10).equals( "Failure" ) )
>              {
> 	       bgColor = "#FF0000";
> 	     }
> 
>              out.println("<tr bgcolor=\""+bgColor+"\">"+
>                          "<td align=center><small><small>" + rs.getString(1)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(2)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(3)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(4)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(5)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(6)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(7)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(8)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(9)
> + "</small></small></td>" +
>                          "</tr>"
>                         );
> 
>              lastFileid = rs.getString(3);
> 
>              /*
> 	     ||
> 	     || Reset the colour
> 	     ||
> 	     */
>              bgColor = "#FFFFFF";
> 
>            }
> 
>            out.println("</table>");
> 
>          }    //close option B
> 
>          /*
>          ||
>          || If the user has selected C then run the query to show
>          || the current Unmatched file details
>          ||
>          */
>          if ( userChoice.equals( "C" ) )
>          {
>    
>            /*
>            ||
>            || Reset the colour
>            ||
>            */
>            bgColor = "#FFFFFF";
> 
>            out.println("<h2 align=center><b>Polled File
> Statistics</b></h2>"+
>                        "<h2 align=center><b><i>"+sysName+"</i></b></h2>"+
>                        "<h3 align=center><b>Unmatched File
> Details</b></h2>"+
>                        "<hr>"
>                       );
> 
>            ResultSet rs = stmt.executeQuery("SELECT system" +
>                                             "      ,filename" +
>                                             "      ,fileid" +
>                                             "      ,flowid" +
>                                             "      ,sender" +
>                                             "      ,recipient" +
>                                             "      ,TO_CHAR( dtime,
> 'DD-MON-YYYY HH24:MI:SS' )" +
>                                             "      ,DECODE( filetype, 'A',
> 'Acknowledgement', 'O', 'Outgoing Flow' ) filetype" +
>                                             "      ,ROUND( ( ( ( SYSDATE -
> dtime ) *1440 ) /60 ), 0 ) overdue_hours" +
>                                             "  FROM poll_file_log" +
>                                             " WHERE status = 'L'" +
>                                             "   AND system = '"+sysName+"'"+
>                                             "   AND TRUNC( dtime ) BETWEEN
> DECODE( TO_DATE( '"+startDate+"', 'DD-MON-YYYY' ), NULL, TRUNC( SYSDATE - 1
> ), TO_DATE( '"+startDate+"', 'DD-MON-YYYY' ) )" +
>                                             "                          AND
> DECODE( TO_DATE( '"+endDate+"', 'DD-MON-YYYY' ), NULL, TRUNC( SYSDATE ),
> TO_DATE( '"+endDate+"', 'DD-MON-YYYY' ) )"+
>                                             " ORDER BY FILEID "
>                                            );
> 
> 
>            out.println("<table cellpadding=3 border=0 align=center>");
> 
>            out.println("<tr>" +
>                        "<td
> align=center><u><small><small>System</small></small></u></td>" +
>                        "<td align=center><u><small><small>File
> Name</small></small></u></td>" +
>                        "<td align=center><u><small><small>File
> ID</small></small></u></td>" +
>                        "<td align=center><u><small><small>Flow
> ID</small></small></u></td>" +
>                        "<td
> align=center><u><small><small>Sender</small></small></u></td>" +
>                        "<td
> align=center><u><small><small>Recipient</small></small></u></td>" +
>                        "<td align=center><u><small><small>Logged
> Date/Time</small></small></u></td>" +
>                        "<td align=center><u><small><small>File
> Type</small></small></u></td>" +
>                        "<td align=center><u><small><small>Overdue
> (Hours)</small></small></u></td>" +
>                        "</tr>"
>                       );
> 
>            while (rs.next())
>            {
> 
>              /*
>              ||
>              || Change the colour
>              ||
>              */
>              bgColor = "##99CCFF";
> 
>              out.println("<tr bgcolor=\""+bgColor+"\">"+
>                          "<td align=center><small><small>" + rs.getString(1)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(2)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(3)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(4)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(5)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(6)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(7)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(8)
> + "</small></small></td>" +
>                          "<td align=center><small><small>" + rs.getString(9)
> + "</small></small></td>" +
>                          "</tr>"
>                         );
>            }
> 
>            out.println("</table>");
> 
>          }    //close option C
> 
>          conn.close();  // close jdbc connection
> 
>        }             //close try
> 
>        catch(SQLException e)
>        {
>          out.println("SQLException: " + e.getMessage() + "<BR>");
>          while((e = e.getNextException()) != null)
>            out.println(e.getMessage() + "<BR>");
>        }
>        catch(ClassNotFoundException e)
>        {
>          out.println("ClassNotFoundException: " + e.getMessage() + "<BR>");
>        }
>        finally
>        {
>          //Clean up resources, close the connection.
>          if(conn != null)
>          {
>             try
>             {
>                conn.close();
>             }
>             catch (Exception ignored) {}
>          }
>       } %>   
>       
>       <div class="navalpha">
>         <div id="bottomleft">
> 	  <hr>
>           <a href="javascript:history.back()">[Back]</a>
>         </div>
>     </div>  
>   </body>	         
> </html>
> __________________ 
>  
> Kevin Thomas 
> Senior Technical Analyst 
> Technical Authority, Deregulated Applications
> Utilities Group, SAIC Ltd. 
> 5 Redwood Place 
> Peel Park 
> East Kilbride 
> G74 5PB 
> Tel: 013558 45260 ( 708 5260 internal ) 
> mailto: kevin.thomas@saic.com
> web: http://www.saic.com
> 
> 
> -----Original Message-----
> From: Adam Buglass [mailto:adam.buglass@ncl.ac.uk] 
> Sent: 30 April 2004 11:01
> To: Tomcat Users List
> Subject: Re: Problems with JSP pages.
> 
> Can you post the code for the 2 pages please?
> Thanks!
> 
> On Fri, 2004-04-30 at 08:51, Thomas, Kevin [OS-IE] wrote:
> > Hi there,
> > 
> > This is my first post to this list so I hope I'm directing it at the right
> > guys. Apologies if I'm not.
> > 
> > I'm running Tomcat 4.0 on a Sun box and everything has been going great on
> I
> > stumbled upon a bizarre problem.
> > 
> > I have a two jsp pages residing in a "test" directory and I use the first
> to
> > enter some values in a form which is passed to the second page that uses
> an
> > JDBC connection to pull back data from an Oracle db.
> > 
> > The pages work fine in this directory however, I created a new context,
> and
> > along with it a new directory and copied the 2 jsp pages into this new
> > directory. I started the webapp in this new directory and then navigated
> to
> > the page in Explorer. Immediately the page loaded, the included header.htm
> > file loaded no problem but the rest of the page didn't. Checking the logs
> I
> > saw the following:
> > 
> > ava.lang.ArrayIndexOutOfBoundsException
> >         at org.apache.jsp.ack_0005findex$jsp._jspService(Unknown Source)
> >         at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >         at org.apache.jasper.servlet.JspServletWrapper.service(Unknown
> > Source)
> >         at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown
> > Source)
> >         at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >         at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
> > Source)
> >         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
> > Source)
> >         at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
> > Source)
> >         at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(Unknown Source)
> >         at org.apache.catalina.core.StandardPipeline.invoke(Unknown
> Source)
> >         at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
> >         at org.apache.catalina.core.StandardContextValve.invoke(Unknown
> > Source)
> >         at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(Unknown Source)
> >         at
> > org.apache.catalina.authenticator.AuthenticatorBase.invoke(Unknown Source)
> >         at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(Unknown Source)
> >         at org.apache.catalina.core.StandardPipeline.invoke(Unknown
> Source)
> >         at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
> >         at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
> >         at org.apache.catalina.core.StandardHostValve.invoke(Unknown
> Source)
> >         at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(Unknown Source)
> >         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
> > Source)
> >         at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(Unknown Source)
> >         at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown
> > Source)
> >         at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(Unknown Source)
> >         at org.apache.catalina.core.StandardPipeline.invoke(Unknown
> Source)
> >         at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
> >         at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
> > Source)
> >         at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(Unknown Source)
> >         at org.apache.catalina.core.StandardPipeline.invoke(Unknown
> Source)
> >         at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
> >         at
> > org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> >         at
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
> >         at
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
> > ction(Http11Protocol.java:376)
> >         at
> > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
> >         at
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> > a:518)
> >         at java.lang.Thread.run(Thread.java:479)
> > 
> > The second jsp page loads no problem at all if I type the address straight
> > into the address bar on explorer with all the right parameters. So why
> will
> > the first page work in one directory but not in another?
> > 
> > Any thoughts, comments on pointers in the right direction would be really
> > welcome.
> > 
> > Cheers,
> > Kev.
> > 
> > __________________ 
> >  
> > Kevin Thomas 
> > Senior Technical Analyst 
> > Technical Authority, Deregulated Applications
> > Utilities Group, SAIC Ltd. 
> > 5 Redwood Place 
> > Peel Park 
> > East Kilbride 
> > G74 5PB 
> > Tel: 013558 45260 ( 708 5260 internal ) 
> > mailto: kevin.thomas@saic.com
> > web: http://www.saic.com
> > 
> > 
> > -----Original Message-----
> > From: Shane Linley [mailto:shane.linley@omegatrend.com] 
> > Sent: 30 April 2004 08:21
> > To: Tomcat Users List
> > Subject: RE: Log4j problems in Tomcat 5.x
> > 
> > Having successfully configuring log4j and after doing some experiments
> with
> > Tomcat I've decided to step into the fray!
> > 
> > I will use 2 steps actually. Log4j for Tomcat and for Webapp. This was
> > tested using TC 5.0.19 on a Windows XP machine... yes, yes, please try to
> > forgive me now....
> > 
> > 
> > Tomcat Log4j Configuration for TC5 (tested on TC 5.0.19)
> > 
> > 1. Obtain a recent Log4j jar file, i used log4j-1.2.8.jar
> > 2. Place it in the TC common lib directory (<CATALINA_HOME>\common\lib)
> > 3. Construct a log4j.properties file and place it in the TC common classes
> > directory (<CATALINA_HOME>\common\classes)
> > 
> > Sample log4j.properties used for my test (also attached):
> > 
> > log4j.rootLogger=ERROR, A1
> > log4j.appender.A1=org.apache.log4j.ConsoleAppender
> > log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> > 
> > # Print the date in ISO 8601 format
> > log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
> > 
> > log4j.logger.org.apache=DEBUG
> > 
> > 4. Start TC5 and watch the logging kick in, a sample log file is attached.
> > 
> > WARNING: Performance will suffer
> > 
> > 
> > 
> > Tomcat Log4j for Webapp
> > 
> > The steps for this were stated in an earlier mail, its quite simple to do.
> > 
> > 1. Place the log4j-1.2.8.jar in to the web-inf lib directory
> (/WEB-INF/lib)
> > 1.1 I also placed the commons-logging.jar file in my web-app also as I am
> > quite confortable with commons logging.
> > 2. Place your log4j.properties file in the web-inf classes directory
> > (WEB-INF/classes)
> > 3. Configure your log4j.properties file as appropriate for your
> application.
> > 
> > As one person was enquiring about, i did activate the struts and file
> upload
> > logging in my webapp at one time to diagnose a problem, here is the config
> > i used:
> > 
> > log4j.rootLogger=ERROR, A1
> > log4j.appender.A1=org.apache.log4j.ConsoleAppender
> > log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> > 
> > # Print the date in ISO 8601 format
> > log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
> > 
> > # Print only messages of level DEBUG or above in the Apache commons and
> > struts file upload
> > log4j.logger.org.apache.commons.httpclient=DEBUG
> > log4j.logger.org.apache.commons.fileupload=DEBUG
> > log4j.logger.org.apache.struts.upload=DEBUG
> > 
> > WARNING: There will be a performance impact with the above logging! :)
> > WARNING: You can also activate TC logging as well from this
> log4j.properties
> > file so don't be too general with your package paths, as again turning on
> to
> > much logging with affect performance.
> > 
> > 4. Instantiate your logging class in whatever way you see fit and run your
> > webapp and the logging will be activated.
> > 
> > If i've botched up my explanation let me know and I will correct it.
> > 
> > Regards,
> > Shane.
> > 
> > -----Original Message-----
> > From: Michael Greer [mailto:michaelggreer@earthlink.net]
> > Sent: Friday, 30 April 2004 5:45 AM
> > To: Tomcat Users List
> > Subject: Re: Log4j problems in Tomcat 5.x
> > 
> > 
> > I couldn't get it to work by following these suggestions either:
> > - putting Log4J in the system classpath
> > - explicitly adding Log4J and the full commons-logging.jar to the
> > startup classpath
> > - replacing commons-logging-api.jar with the full commons-logging.jar
> > (it needs something special in there, for some reason)
> > 
> > I have to say, this seems broken to me, unless someone can explain how
> > this behavior is intentional. Even if these had worked, this is not a
> > clean solution. What is the purpose of using commons-logging if the
> > underlying logging system is ignored?
> > Again, I am talking about controlling the logging for included
> > libraries, not my own code (which avoids the mess that is
> > commons-logging).
> > 
> > -Michael Greer
> > 
> > On Thursday, April 29, 2004, at 04:53 PM, Filip Hanik - Dev wrote:
> > 
> > > you do have to replace the commons-logging.jar in TOMCAT/bin with the
> > > jar that contains the log4j impl. That is one of the things I
> > > found out
> > >
> > > FIlip
> > > ----- Original Message -----
> > > From: "Filip Hanik - Dev" <devlists@hanik.com>
> > > To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> > > Sent: Thursday, April 29, 2004 3:46 PM
> > > Subject: Re: Log4j problems in Tomcat 5.x
> > >
> > >
> > > the commons logging is reading from the System classpath, I messed
> > > around with this a while back, and all the binaries are in /bin/
> > > so in there you must add some additional libraries, like log4j and
> > > some more commons
> > >
> > > Filip
> > > ----- Original Message -----
> > > From: "Michael Greer" <michaelggreer@earthlink.net>
> > > To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> > > Sent: Thursday, April 29, 2004 2:53 PM
> > > Subject: Re: Log4j problems in Tomcat 5.x
> > >
> > >
> > > Sorry, I meant that the Log4J implementation was not found:
> > >
> > > java.lang.reflect.InvocationTargetException
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at
> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
> > > v
> > > a:39)
> > > at
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
> > > r
> > > Impl.java:25)
> > > at java.lang.reflect.Method.invoke(Method.java:324)
> > > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
> > > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
> > > Caused by: java.lang.ExceptionInInitializerError
> > > at
> > > org.apache.catalina.core.StandardContext.start(StandardContext.java:420
> > > 7
> > > )
> > > at
> > > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)
> > > at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
> > > at
> > > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)
> > > at
> > > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:521)
> > > at
> > > org.apache.catalina.core.StandardService.start(StandardService.java:519
> > > )
> > > at
> > > org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
> > > at org.apache.catalina.startup.Catalina.start(Catalina.java:594)
> > > ... 6 more
> > > Caused by: org.apache.commons.logging.LogConfigurationException:
> > > org.apache.commons.logging.LogConfigurationException:
> > > java.lang.ClassNotFoundException:
> > > org.apache.commons.logging.impl.Log4JLogger
> > > at
> > > org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryIm
> > > p
> > > l.java:532)
> > > at
> > > org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryIm
> > > p
> > > l.java:272)
> > > at
> > > org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryIm
> > > p
> > > l.java:246)
> > > at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
> > > at org.apache.catalina.startup.TldConfig.<clinit>(TldConfig.java:110)
> > > ... 14 more
> > > Caused by: org.apache.commons.logging.LogConfigurationException:
> > > java.lang.ClassNotFoundException:
> > > org.apache.commons.logging.impl.Log4JLogger
> > > at
> > > org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFac
> > > t
> > > oryImpl.java:416)
> > > at
> > > org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryIm
> > > p
> > > l.java:525)
> > > ... 18 more
> > > Caused by: java.lang.ClassNotFoundException:
> > > org.apache.commons.logging.impl.Log4JLogger
> > > at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
> > > at java.security.AccessController.doPrivileged(Native Method)
> > > at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
> > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
> > > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
> > > at java.lang.Class.forName0(Native Method)
> > > at java.lang.Class.forName(Class.java:140)
> > > at
> > > org.apache.commons.logging.impl.LogFactoryImpl$1.run(LogFactoryImpl.jav
> > > a
> > > :466)
> > > at java.security.AccessController.doPrivileged(Native Method)
> > > at
> > > org.apache.commons.logging.impl.LogFactoryImpl.loadClass(LogFactoryImpl
> > > .
> > > java:454)
> > > at
> > > org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFac
> > > t
> > > oryImpl.java:406)
> > > ... 19 more
> > >
> > > On Thursday, April 29, 2004, at 03:43 PM, Filip Hanik - Dev wrote:
> > >
> > >> what class is not found? why dont you give us the error message :)
> > >> ----- Original Message -----
> > >> From: "Michael Greer" <michaelggreer@earthlink.net>
> > >> To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> > >> Sent: Thursday, April 29, 2004 2:31 PM
> > >> Subject: Log4j problems in Tomcat 5.x
> > >>
> > >>
> > >> hello,
> > >> I switched from Tomcat 4 to 5, and ever since have had unsolvable
> > >> problems with logging. In short, the commons logger refuses to use
> > >> Log4j. This would be fine for Tomcat itself, but all of my classes
> > >> that
> > >> use commons-logging get taken over in this way. i have moved my own
> > >> code to use Log4j directly (so I know it works, and is configured
> > >> correctly, and is in the classpath of the context), but all of my jars
> > >> that use commons are out of my control.
> > >> If I try and force commons to use log4j, ( with
> > >> org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLo
> > >> g
> > >> g
> > >> er in a commons-logging.properties file in /WEB-INF/classes), it gives
> > >> me a ClassNotFound exception, no matter where I place the log4j jar.
> > >> I have seen many messages on this list related to this issue, but no
> > >> solutions. Has anyone come up with anything?
> > >>
> > >> thank you,
> > >> Michael Greer
> > >>
> > >> PS: I have tried putting the log4j.jar in server/lib. shared/lib,
> > >> common/lib. This problem occurs in Linux and Mac OS X. My
> > >> log4j.properties file is in my /WEB-INF/classes folder, and is being
> > >> read correctly for my own classes which use log4j directly.
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > >> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > >> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message