Esempio n. 1
0
 private void sendStartupContent(HttpServletRequest request, HttpServletResponse response)
     throws IOException {
   String accept = request.getHeader(HTTP.HEADER_ACCEPT);
   if (accept != null && accept.contains(HTTP.CONTENT_TYPE_JSON)) {
     StartupJson.send(response);
   } else {
     applicationContext.getStartupPage().send(response);
   }
 }
Esempio n. 2
0
 private void registerJavascriptResource(ContentBuffer buffer, String name) throws IOException {
   InputStream inputStream = buffer.getContentAsStream();
   try {
     resourceManager.register(name, inputStream);
   } finally {
     inputStream.close();
   }
   String location = resourceManager.getLocation(name);
   applicationContext.getStartupPage().setClientJsLibrary(location);
 }