@GET
@Path("/populateEvents")
@Produces("text/html")
public String populateEvents() {
try {
CalendarEvent e = new CalendarEvent();
e.setTitle("Event A");
e.setAllDay(true);
e.setStart("12/02/2012");
e.setDescription("Description event A");
calendarDao.persistEvent(e);
CalendarEvent e1 = new CalendarEvent();
e1.setTitle("Event B");
e1.setAllDay(true);
e1.setStart("21/02/2012");
e1.setDescription("Description event B");
calendarDao.persistEvent(e1);
CalendarEvent e2 = new CalendarEvent();
e2.setTitle("Event C");
e2.setAllDay(false);
e2.setStart("21/02/2012 13:00");
e2.setEnd("21/02/2012 14:30");
e1.setDescription("Description event c");
calendarDao.persistEvent(e2);
} catch (Exception e) {
e.printStackTrace();
return "Insert data failed: " + e.getMessage();