日期:2014-05-20 浏览次数:20983 次
严重: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter(Response.java:610) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:186) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77) at org.apache.jsp.vcode_jsp._jspService(vcode_jsp.java:149)
public ActionForward doLogin(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { // TODO Auto-generated method stub HttpSession session = request.getSession(true); DynaActionForm dynaAction = (DynaActionForm)form ; int petId = ((Integer)dynaAction.get("petId")).intValue(); String password = dynaAction.getString("petPassword"); String vCode2 = dynaAction.getString("valiCode"); String vCode1 = (String)session.getAttribute("vcode"); PetInfo pet = biz.login(petId, password); if(pet != null && vCode1.equals(vCode1)){ session.setAttribute("current_pet", pet); try { response.sendRedirect("ShowBaby.do?id="+petId); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null ; } ActionMessages errors = new ActionMessages(); if(!vCode1.equals(vCode2)){ errors.add("login_valiCode", new ActionMessage("errors.login.valiCode")); super.addErrors(request, errors); return mapping.findForward("fail"); } errors.add("login_fail", new ActionMessage("errors.login.fail")); super.saveErrors(request, errors); return mapping.findForward("fail");