Hi,
I have a page that used to work perfectly and broke when I changed a few if
statements (approximately). Now I can't get <jsp:include .. >'s to work, and
one of my beans is returning a very bizarre result.
This is the call to the bean from the jsp:
<jsp:useBean id="mkDate" scope="page" class="hepC.utils.DateMaker"/>
...
<% sColl = mkDate.newDate(); %>
...
<%= sColl %>
And this is the java code for DateMaker:
package hepC.utils;
import java.io.*;
import java.util.*;
public class DateMaker implements Serializable {
String dateHtml;
public DateMaker() {
dateHtml = "";
}
public String newDate() {
String sHourHTML = "";
String sMinHTML = "";
dateHtml = "<select name='selCollHour'>";
sMinHTML = "<option value='00'>00 \n <option value='05'>05
\n";
for (int intHour=0;intHour<24;intHour++) {
sHourHTML = sHourHTML + "<option value='" + intHour
+ "'>" + intHour + "\n";
}
dateHtml = dateHtml + sHourHTML + "</select> : \n <select
name='selCollMin'>";
for (int intMin=10;intMin<56;intMin=intMin+5) {
sMinHTML = sMinHTML + "<option value='" + intMin +
"'>" + intMin + "\n";
}
dateHtml = dateHtml + sMinHTML + "</select>
<select name='selCollTime'>";
dateHtml = dateHtml + "<option value='am' selected>AM \n
<option value='pm'>PM \n <option value=''>Military \n </select> \n";
return dateHtml;
}
}
But this is what I get when I try and load the page:
<tr>
<td align='right'>Collection Date</td>
<td colspan='3'><nobr><input type='text' name='txtCollDate'
size='10' value=''>
<font size='-1'><i> (mm/dd/yy) </i> </font>
Time: <select
name='selCollHour'><option value='0'>0
<option value='1'>1
<option value='2'>2
<option value='3'>3
<optio
It truncates in the middle of the fifth option for no apparent reason, and
that's the end of the HTML. And all I've changed since it was working was
the evaluation of a variable that should have nothing whatsoever to do with
the DateMaker functionality.
Any thoughts on why it's breaking?
Thanks,
Garann
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com