Beispiel #1
0
 protected Link retrieveLink(final HttpServletRequest httpServletRequest) {
   String uri =
       httpServletRequest
           .getRequestURI()
           .substring(httpServletRequest.getRequestURI().lastIndexOf("/") + 1);
   _log.debug("Extracted URI: " + uri);
   return Link.create(uri);
 }
Beispiel #2
0
 protected <T> T readRequest(final HttpServletRequest httpServletRequest, final Class<T> classOfT)
     throws IOException {
   final BufferedReader br = new BufferedReader(httpServletRequest.getReader());
   Gson gson = new Gson();
   return gson.fromJson(br, classOfT);
 }