Mercurial > hg > Members > nobuyasu > jungle-network
view src/main/java/app/bbs/RequestNumCheckServlet.java @ 170:2403b9a4416f
create Delete Attribute Method
author | tatsuki |
---|---|
date | Wed, 30 Jul 2014 10:20:01 +0900 |
parents | 0efdfe370400 |
children |
line wrap: on
line source
package app.bbs; import java.io.PrintWriter; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class RequestNumCheckServlet extends HttpServlet { private final NetworkBulletinBoard bbs; private static final long serialVersionUID = 1L; public RequestNumCheckServlet(NetworkBulletinBoard _bbs) { bbs = _bbs; } public void doGet(HttpServletRequest _req,HttpServletResponse _res) { int num = bbs.getRequestNum(); try{ PrintWriter pw = _res.getWriter(); pw.write(Integer.toString(num)); pw.flush(); }catch(Exception _e){ _res.setStatus(500); } } }