📄 recordsearch.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GBK" import="imis.*,javax.naming.*,javax.rmi.PortableRemoteObject,java.util.*"%><% request.setCharacterEncoding("GBK"); session=request.getSession(); userStruct user=(userStruct)session.getAttribute("user"); if(user==null){ response.sendRedirect("../../login.html"); } else if(user.userAccess.intValue()!=2&&user.userAccess.intValue()!=11) response.sendRedirect("../../error/access.html");else{%><%String markname = request.getParameter("markname");String markunit = request.getParameter("markunit"); Collection collect=new ArrayList(); Context ctx = new InitialContext(); NavigationmarkStruct ns=new NavigationmarkStruct(); //look up jndi name Object ref = ctx.lookup("NavigationmarkControllerEJB"); //cast to Home interface NavigationmarkControllerEJBHome nscHome = (NavigationmarkControllerEJBHome) PortableRemoteObject.narrow(ref, NavigationmarkControllerEJBHome.class); NavigationmarkControllerEJB nsc = nscHome.create();if(!markname.equals("")){ns = nsc.getNavigationmarkValue(markname);collect.add(ns);}else{if(!markunit.equals("")){ Collection tem=nsc.findAll(); Iterator i=tem.iterator(); while(i.hasNext()){ ns=(NavigationmarkStruct)i.next(); if(ns.markunit.equals(markunit)){ Judge jd=new Judge(); if(jd.decide(user.unitid,ns.unitid)) collect.add(ns); } } }else{ Collection tem=nsc.findAll(); Iterator i=tem.iterator(); while(i.hasNext()){ ns=(NavigationmarkStruct)i.next(); Judge jd=new Judge(); if(jd.decide(user.unitid,ns.unitid)) collect.add(ns); } }}%><% session.setAttribute("recordc", collect); response.sendRedirect("recordlisted.jsp");%><%}%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -