the index is not the key of his problem, the date did get mess when index is
greater than 24.  That could be a problem related to how he handled the date
object, but for sure, changing index won't solve the problem. The issue is
he do need a way to print whatever many days (future or before) in the list.
My last email is a solution, but certainly there are various ways to do it.

Dawei

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Shawn Zhu
Sent: Monday, February 12, 2001 2:52 PM
To: [EMAIL PROTECTED]
Subject: Re: Java Date Class problem


hahah...dang, wonder how much his company pays him.
This just need some basic debugging and code reviewing.

Well I guess if you are frustrated you can just over look
certain intricate things.  Forgivable. heh

> -----Original Message-----
> From: Daryani Santosh [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 12, 2001 12:01 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Java Date Class problem
>
>
> check your for loop , it says i=1 , i < 27 ofcourse it will
> print 25 values ,
> change your for loop terminating condition
>
> Santosh
>
>
>
>
>
>
>
>
> Senaka Suriyaarachchi <[EMAIL PROTECTED]> on
> 12/22/2000 03:15:37 AM
>
> Please respond to A mailing list about Java Server Pages
> specification and
>       reference <[EMAIL PROTECTED]>
>
> To:   [EMAIL PROTECTED]
> cc:    (bcc: Santosh Daryani/IT/Aon Consulting)
>
> Subject:  Java Date Class problem
>
>
>
> Hi All
> I tried to show drop down list with next 30 dates. but it
> doesn't work. It
> correctly add up to 25 days after that it show previous days.
> Please advice
> me.
>
> BR
> Senaka
>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <%@ page language="java" import="java.sql.*, java.util.Date"%>
> <jsp:useBean id="conn"  class="ConnectLib" scope="session" />
> <html>
> <head>
>         <title>Untitled</title>
> </head>
>
> <body>
>                 <%
>                 Date nd = new Date();
>             long lnd = nd.getTime();
>             Date todate = new Date(lnd);
>             String today = todate.toString();
>             java.sql.Date dbday = new  java.sql.Date(lnd);
>                 long lndnew = lnd;
>                 %>
> <form action="">
> <table>
> <tr>
> <td colspan="3">Reservation Date</td>
>                 <td><select name="reservDate">
>                     <% for(int i=1; i<27; i++){%>
>                         <option value="<%=(lndnew+
> i*24*60*60*1000)%>"><%= (new
> java.sql.Date(lndnew + i*24*60*60*1000))%></option>
>                         <% }%>
>                         </select>
>                 </td>
>                 <td><input type="submit" name="reserv"
> value="Reserv"></td>
> </tr>
> </table>
> </form>
>
> </body>
> </html>
>
> ==============================================================
> =============
> 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://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ==============================================================
> =============
> 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://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ==============================================================
> =============
> 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://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
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://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
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://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to