我已經嘗試了這個論壇的推薦以及通過很多谷歌搜索......但是我仍然無法通過jsp獲得事件顯示在我的日曆上....我嘗試使用PHP,它的工作...嘆了口氣...我不知道哪裏是錯誤....嘆息....儘管嘗試了很多次,事件仍然沒有顯示...嘆息
processRequest方法是好的,但當它調度到JSP頁面...沒有從瀏覽器中出現....
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String email=request.getParameter("email");
try {
ArrayList<CalendarEvt> calc=CalendarDAO.retrieveEvent(email);
for (CalendarEvt calendarEvt : calc) {
System.out.println(calendarEvt.getEventId());
}
request.setAttribute("calendar", calc);
request.getRequestDispatcher("calendar.jsp").forward(request, response);
} catch (Exception e) {
}
}
這裏是JSP節竟然放棄了我頭疼......(不循環...的谷歌鏈接確實出現...)...我已經試過把引號放在外面......仍然沒有luc k:
<%--Load user's calendar--%>
<script type='text/javascript'>
$(document).ready(function() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$('#calendar').fullCalendar({
editable: false,
events: [
<c:forEach items="calendar" var="calc">
{
title: '${calc.eventName}',
start: ${calc.eventStart}
},
</c:forEach>
{
title: 'Click for Google',
start: new Date(y, m, 1),
end: new Date(y, m, 1),
url: 'http://google.com/'
}
]//end of events
});
});
</script>
<%--Load user's calendar--%>
...任何形式的幫助將不勝感激...... thx !!
燁... THX ...我可以看到一些改變現在的日曆......除了事件日期JSP的調度後,無法解析servlet的字符串數據.... – user614454 2010-05-11 14:45:37