accountdel.jsp
来自「《jsp案例开发》这本书的源代码。包括源代码和相关的具体配置操作步骤。非常不错」· JSP 代码 · 共 37 行
JSP
37 行
<%@ page language="java" contentType="text/html; charset=GBK" import="imis.*,javax.naming.*,javax.rmi.PortableRemoteObject,java.util.*,java.text.*"%><% request.setCharacterEncoding("GBK"); session=request.getSession(); userStruct user=(userStruct)session.getAttribute("user"); String deviceid = (String)session.getAttribute("inaccountde"); if(user==null){ response.sendRedirect("../../login.html"); } else if(user.userAccess.equals(new Integer(12))||user.userAccess.equals(new Integer(9))){ try{ Context ctx = new InitialContext(); Object ref = ctx.lookup("OtherController"); OtherControllerHome otherControllerHome = (OtherControllerHome) PortableRemoteObject.narrow(ref, OtherControllerHome.class); OtherController othercontroller = otherControllerHome.create(); InaccountJBean instruct = new InaccountJBean(); instruct = othercontroller.getInaccountByDeviceid(deviceid); boolean ok = false; ok = othercontroller.removeInaccount(instruct.device_id); if(ok){ response.sendRedirect("accountlist.jsp"); }else{ response.sendRedirect("../../error/deleteerror.html"); } } catch(Exception e){ e.printStackTrace(); response.sendRedirect("../../error/deleteerror.html"); } }else{ response.sendRedirect("../../error/accesserror.html"); }%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?