=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SystemController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SystemController.java 2013-10-14 07:47:21 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SystemController.java 2013-10-14 07:57:24 +0000 @@ -145,8 +145,8 @@ JacksonUtils.toJson( response.getOutputStream(), importSummary ); } - @RequestMapping( value = "/info", method = RequestMethod.GET, produces = { "*/*", "application/json" } ) - public void getSystemInfo( HttpServletRequest request, HttpServletResponse response ) throws IOException + @RequestMapping( value = "/info", method = RequestMethod.GET, produces = { "application/json", "application/javascript" } ) + public String getSystemInfo( Model model, HttpServletRequest request, HttpServletResponse response ) { SystemInfo info = systemService.getSystemInfo(); @@ -157,19 +157,23 @@ { info.clearSensitiveInfo(); } + + model.addAttribute( "model", info ); - JacksonUtils.toJson( response.getOutputStream(), info ); + return "info"; } - @RequestMapping( value = "/context", method = RequestMethod.GET, produces = { "*/*", "application/json" } ) - public void getContextInfo( HttpServletRequest request, HttpServletResponse response ) throws IOException + @RequestMapping( value = "/context", method = RequestMethod.GET, produces = { "application/json", "application/javascript" } ) + public String getContextInfo( Model model, HttpServletRequest request, HttpServletResponse response ) { SystemInfo info = new SystemInfo(); info.setContextPath( ContextUtils.getContextPath( request ) ); info.setUserAgent( request.getHeader( ContextUtils.HEADER_USER_AGENT ) ); - JacksonUtils.toJson( response.getOutputStream(), info ); + model.addAttribute( "model", info ); + + return "info"; } @RequestMapping( value = "/ping", method = RequestMethod.GET, produces = "text/plain" )