JQuery Full Calendar with Spring MVC .. Can't call the controller to get JSON object <p>I am trying to use JQuery <a href="http://arshaw.com/fullcalendar/" rel="nofollow noreferrer">Full Calendar</a> along with Spring MVC + Freemarker.</p> <p>I have made a demo like <a href="http://arshaw.com/js/fullcalendar-1.5.3/demos/selectable.html" rel="nofollow noreferrer">that</a>.</p> <p>Target: I need to call the controller to fetch JSON object that contains events to render over the calendar.</p> <p>Issue: I have the following freemarker that it should go to the controller and get the JSON object to render,but it doesn't go ?!!</p> <p>Freemarker:</p> <p>[#ftl /]</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function() { var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); var calendar = $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, selectable: true, selectHelper: true, select: function(start, end, allDay) { var title = prompt('Event Title:'); if (title) { calendar.fullCalendar('renderEvent', { title: title, start: start, end: end, allDay: allDay }, true // make the event "stick" ); } calendar.fullCalendar('unselect'); }, editable: true, events: [ { url: '[@spring.url '/vacation/getVacation'/]', type: 'GET', data: { start: 'start', id: 'id', title: 'title' } } ] }); }); </code></pre> <p> </p> <pre><code>body { margin-top: 40px; text-align: center; font-size: 14px; font-family: "Lucida Grande", Helvetica, Arial, Verdana, sans-serif; } #calendar { width: 900px; margin: 0 auto; } </code></pre> <p> </p> <p></p> <p>The controller:</p> <pre><code>@RequestMapping(value = "/vacation/getVacation", method = RequestMethod.GET) public @ResponseBody void getVacation(HttpServletResponse response) { Map&lt;String, Object&gt; map = new HashMap&lt;String, Object&gt;(); map.put("id", 111); map.put("title", "event1"); map.put("start", "2011-07-28"); 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"); try { response.getWriter().write(json); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } </code></pre> <p>Firebug shot : <img src="https://i.stack.imgur.com/lJxXo.jpg" alt="enter image description here"></p>