4142434445464748
public void render(HttpServletRequest req, HttpServletResponse resp) throws HttpException { try { renderToWriter(new OutputStreamWriter(resp.getOutputStream())); } catch (IOException e) { log.error(e,e); throw new HttpException(e); } }
4243444546474849
context.put("latest_poll_list", latest_poll_list); return renderToResponse("src/main/webapp/templates/index.html", context); } catch (DaoException e) { throw new HttpException(e); } }
6263646566676869
context.put("poll", p); context.put("form", form); return renderToResponse("src/main/webapp/templates/detail.html", context); } catch (DaoException e) { throw new HttpException(e); } }
7475767778798081
Map<String, Object> context = new HashMap<String, Object>(); context.put("poll", p); return renderToResponse("src/main/webapp/templates/results.html", context); } catch (DaoException e) { throw new HttpException(e); } }
109110111112113114115116
selected_choice.setVotes(votes + 1); // due to the way hibernate works this will automatically save when the middleware commits return new HttpResponseRedirect("/polls/" + poll_id + "/results/"); } } catch (DaoException e) { throw new HttpException(e); } }