tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A.L." <amoslie...@yahoo.com>
Subject Servlet design question.
Date Tue, 14 Aug 2001 14:39:56 GMT
I am trying to create an internet based calendar
system similar to the one available at yahoo.com.  My
question is about the best way to design this system.

Currently I have a servlet whose main role during the
doget/dopost methods, is to create a monthlyCalendar
object and a dayCalendar object.  The drawMonth method
of monthly-calendar returns a String that is the html
code for a monthly calendar.  The dayCalendar object
calendar creates a database connection and the drawDay
method returns html code with the data from the
database for a specific chosen day.

  The doGet, doPost Methods of calendarServlet, simply
outprintln the strings returned by the monthlyCalendar
and dayCalendar objects' drawDay and drawMonth
methods.


My first question,  

    Is this good design?  Are there any better
suggestions?  

 My second question is more specific to the code:
the drawMonth method of monthlyCalendar returns a
table which represents the chosen month.  I would like
each item in the table(which represents a given day of
the month)to be text, which when clicked will change
the arguments calendarServlet sends to the drawDay
method of dayCalendar.

  Any suggestions on how I can do this?



Thanks,
    -Amos



p.s.  As in an earlier request, this question is not
specific to TomCat, yet I have been told that it is
o.k. to ask general servlet questions here.  If anyone
has a better place for me to ask general servlet
questions I would be happy to ask them there.

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Mime
View raw message