calendarクラス
import java.util.Calendar;
Calendar cal1 = Calendar.getInstance();
        int hour = cal1.get(Calendar.HOUR_OF_DAY);
        int minute = cal1.get(Calendar.MINUTE);
        int second = cal1.get(Calendar.SECOND);
        int year = cal1.get(Calendar.YEAR);
        int month = cal1.get(Calendar.MONTH);
        int date = cal1.get(Calendar.DATE);
        int weeknum = cal1.get(Calendar.DAY_OF_WEEK);
        String week[] = {"土","日","月","火","水","木","金"};
文字エンコード指定
response.setContentType("text/html; charset=UTF-8");
PrintWriter out = response.getWriter();
文字化けする時、responseを先に記入しないと文字エンコード指定が適用されない。