manusearchpro.jsp
来自「《jsp案例开发》这本书的源代码。包括源代码和相关的具体配置操作步骤。非常不错」· JSP 代码 · 共 44 行
JSP
44 行
<%@ page language="java" contentType="text/html; charset=GBK" import="imis.*,javax.naming.*,javax.rmi.PortableRemoteObject,java.util.*,java.sql.*,java.io.*"%><% request.setCharacterEncoding("GBK"); session=request.getSession(); userStruct session_us=(userStruct)session.getAttribute("user"); if(session_us==null){ response.sendRedirect("../../login.html"); } else if(session_us.getAccess().intValue()!=0&&session_us.getAccess().intValue()!=1){ try{ Context manuctx = new InitialContext(); Object manuref = manuctx.lookup("OtherController"); OtherControllerHome otherControllerHome = (OtherControllerHome) PortableRemoteObject.narrow(manuref, OtherControllerHome.class); OtherController othercontroller = otherControllerHome.create(); Collection collect=new ArrayList(); // Collection sel_collect=new ArrayList(); //String id = request.getParameter("manu_id"); String name = request.getParameter("manu_name") ; String product = request.getParameter("manu_product") ; if(!name.equals("")){ collect = othercontroller.getManuByName(name); }else if(!product.equals("")){ collect = othercontroller.getManuByProduct(product); }else{ collect = othercontroller.getManuAll() ; } session.setAttribute("manusearchrel",collect); response.sendRedirect("manusearch.jsp"); } catch(Exception e){ response.sendRedirect("../../error/nohave.html"); } }else{ response.sendRedirect("../../error/accesserror.html"); } %>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?