envets is not displayed on my fullcalendar
- by ChangJiu
Hi BalusC!
I have used your method at above in my servelt.
[CalendarMap]
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
Map map = new HashMap();
map.put("id", 115);
map.put("title", "changjiu");
map.put("start", new SimpleDateFormat("yyyy-MM-15").format(new Date()));
map.put("url", "http://yahoo.com/");
// Convert to JSON string.
String json = new Gson().toJson(map);
// Write JSON string.
response.setContentType("application/json");
response.setCharacterEncoding("UTF-8");
response.getWriter().write(json);
}
I want to display it my fullcalendar as follow.
$(document).ready(function() {
$('#calendar').fullCalendar({
eventSources: [
"CalendarMap"
]
});
});
but it's not worked! Can you help me? thank you!