예제 #1
0
 /** @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */
 protected void doGet(HttpServletRequest request, HttpServletResponse response)
     throws ServletException, IOException {
   JSONObject reqJSON = StringUtil.fromReaderToJSON(request.getReader());
   JSONObject result = dao.uploadImage(reqJSON);
   response.setContentType("text/json;charset=UTF-8");
   response.getWriter().write(result.toString());
 }
예제 #2
0
 /** @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */
 protected void doGet(HttpServletRequest request, HttpServletResponse response)
     throws ServletException, IOException {
   JSONObject reqJSON = StringUtil.fromReaderToJSON(request.getReader());
   Thought t = (Thought) JSONObject.toBean(reqJSON, Thought.class, Thought.loadClassMap());
   JSONObject result = dao.postThought(t);
   response.setContentType("text/json;charset=UTF-8");
   response.getWriter().write(result.toString());
 }