📄 __grantandremove.java
字号:
/* compiled from JSP: /grantandremove.jsp
*
* This code was automatically generated at 11:51:34 on 2005-4-22
* by weblogic.servlet.jsp.Jsp2Java -- do not edit.
*/
package jsp_servlet;
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
// User imports
import javax.naming.*; //[ /grantandremove.jsp; Line: 2]import java.util.Properties; //[ /grantandremove.jsp; Line: 2]import javax.rmi.PortableRemoteObject; //[ /grantandremove.jsp; Line: 2]import testejb.*; //[ /grantandremove.jsp; Line: 2]
// built-in init parameters:
// boolean _verbose -- wants debugging
// Well-known variables:
// JspWriter out -- to write to the browser
// HttpServletRequest request -- the request object.
// HttpServletResponse response -- the response object.
// PageContext pageContext -- the page context for this JSP
// HttpSession session -- the session object for the client (if any)
// ServletContext application -- The servlet (application) context
// ServletConfig config -- The ServletConfig for this JSP
// Object page -- the instance of this page's implementation class (i.e., 'this')
/**
* This code was automatically generated at 11:51:34 on 2005-4-22
* by weblogic.servlet.jsp.Jsp2Java -- do not edit.
*
* Copyright (c) 2005 by BEA Systems, Inc. All Rights Reserved.
*/
public final class __grantandremove
extends
weblogic.servlet.jsp.JspBase
implements weblogic.servlet.jsp.StaleIndicator
{
// StaleIndicator interface public boolean _isStale() { weblogic.servlet.jsp.StaleChecker sci =(weblogic.servlet.jsp.StaleChecker)(getServletConfig().getServletContext()); java.io.File f = null; long lastModWhenBuilt = 0L; if (sci.isResourceStale("/grantandremove.jsp", 1113970903821L, "8.1.2.0", "GMT+08:00")) return true; return false; } public static boolean _staticIsStale(weblogic.servlet.jsp.StaleChecker sci) { java.io.File f = null; long lastModWhenBuilt = 0L; if (sci.isResourceStale("/grantandremove.jsp", 1113970903821L, "8.1.2.0", "GMT+08:00")) return true; return false; } private static void _writeText(ServletResponse rsp, JspWriter out, String block, byte[] blockBytes) throws IOException { if (!_WL_ENCODED_BYTES_OK || _hasEncodingChanged(rsp)) { out.print(block); } else { ((weblogic.servlet.jsp.ByteWriter)out).write(blockBytes, block); } } private static boolean _hasEncodingChanged(ServletResponse rsp) { if (_WL_ORIGINAL_ENCODING.equals(rsp.getCharacterEncoding())) { return false; } return true; } private static boolean _WL_ENCODED_BYTES_OK = true; private static final String _WL_ORIGINAL_ENCODING = "GB2312"; private static byte[] _getBytes(String block) { try { return block.getBytes(_WL_ORIGINAL_ENCODING); } catch (java.io.UnsupportedEncodingException u) { _WL_ENCODED_BYTES_OK = false; } return null; } private final static String _wl_block0 = "\r\n"; private final static byte[] _wl_block0Bytes = _getBytes(_wl_block0); private final static String _wl_block1 = "\r\n\r\n\r\n<html>\r\n<head>\r\n<title>员工权限管理</title>\r\n<style type=\"text/css\">\r\n<!--\r\ntable {\r\n\tfont-family: \"宋体\";\r\n\tfont-size: 12px;\r\n}\r\n-->\r\n</style>\r\n</head>\r\n\r\n<body>\r\n<center>\r\n"; private final static byte[] _wl_block1Bytes = _getBytes(_wl_block1); private final static String _wl_block2 = "\r\n<form action=\"grantorremove\" method=\"post\" name=\"form1\" style=\"border-collapse:collapse \">\r\n <table width=\"32%\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#0099FF\">\r\n <tr>\r\n <td width=\"24%\" height=\"25\"><div align=\"center\">姓 名:</div></td>\r\n <td width=\"76%\" height=\"25\"><div align=\"center\">"; private final static byte[] _wl_block2Bytes = _getBytes(_wl_block2); private final static String _wl_block3 = "\r\n </div></td>\r\n </tr>\r\n <tr>\r\n <td height=\"25\"><div align=\"center\">登陆ID:</div></td>\r\n <td height=\"25\"><div align=\"center\">"; private final static byte[] _wl_block3Bytes = _getBytes(_wl_block3); private final static String _wl_block4 = "\r\n </div></td>\r\n </tr>\r\n\r\n <tr>\r\n <td height=\"30\" colspan=\"2\"><div align=\"left\">已授予权限:</div></td>\r\n </tr>\r\n\r\n "; private final static byte[] _wl_block4Bytes = _getBytes(_wl_block4); private final static String _wl_block5 = "\r\n <tr>\r\n <td height=\"25\"><div align=\"center\">\r\n <input type=\"checkbox\" name=\"myperm\" value=\""; private final static byte[] _wl_block5Bytes = _getBytes(_wl_block5); private final static String _wl_block6 = "\">\r\n </div></td>\r\n <td height=\"25\"><div align=\"center\">"; private final static byte[] _wl_block6Bytes = _getBytes(_wl_block6); private final static String _wl_block7 = "\r\n </div></td>\r\n </tr>\r\n "; private final static byte[] _wl_block7Bytes = _getBytes(_wl_block7); private final static String _wl_block8 = "\r\n <tr>\r\n <td height=\"25\" colspan=\"2\">\r\n <div align=\"right\">\r\n <input name=\"action\" type=\"submit\" id=\"action\" value=\"取消授权\">\r\n\r\n </div></td>\r\n </tr>\r\n "; private final static byte[] _wl_block8Bytes = _getBytes(_wl_block8); private final static String _wl_block9 = "\r\n <tr>\r\n <td height=\"25\" colspan=\"2\">\r\n <div align=\"center\">\r\n 未授予任何权限\r\n\r\n </div></td>\r\n </tr>\r\n\r\n\r\n "; private final static byte[] _wl_block9Bytes = _getBytes(_wl_block9); private final static String _wl_block10 = "\r\n <tr>\r\n <td height=\"30\" colspan=\"2\"><div align=\"left\">未授予权限:</div></td>\r\n </tr>\r\n"; private final static byte[] _wl_block10Bytes = _getBytes(_wl_block10); private final static String _wl_block11 = "\r\n <tr>\r\n <td height=\"30\" colspan=\"2\"><div align=\"center\">没有可以授予的权限</div></td>\r\n </tr>\r\n\r\n "; private final static byte[] _wl_block11Bytes = _getBytes(_wl_block11); private final static String _wl_block12 = "\r\n <tr>\r\n <td height=\"25\"><div align=\"center\">\r\n <input type=\"checkbox\" name=\"myrestperm\" value=\""; private final static byte[] _wl_block12Bytes = _getBytes(_wl_block12); private final static String _wl_block13 = "\">\r\n </div></td>\r\n <td height=\"25\"><div align=\"center\">"; private final static byte[] _wl_block13Bytes = _getBytes(_wl_block13); private final static String _wl_block14 = "\r\n </div></td>\r\n </tr>\r\n "; private final static byte[] _wl_block14Bytes = _getBytes(_wl_block14); private final static String _wl_block15 = "\r\n <tr>\r\n <td height=\"25\" colspan=\"2\"><div align=\"right\">\r\n <input name=\"action\" type=\"submit\" id=\"action3\" value=\"授权\">\r\n </div></td>\r\n </tr>\r\n\r\n </table>\r\n</form>\r\n"; private final static byte[] _wl_block15Bytes = _getBytes(_wl_block15); private final static String _wl_block16 = "\r\n</center>\r\n</body>\r\n</html>\r\n\r\n"; private final static byte[] _wl_block16Bytes = _getBytes(_wl_block16);
public void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
{
// declare and set well-known variables:
javax.servlet.ServletConfig config = getServletConfig();
javax.servlet.ServletContext application = config.getServletContext();
javax.servlet.jsp.tagext.Tag _activeTag = null;
// variables for Tag extension protocol
Object page = this;
javax.servlet.jsp.JspWriter out;
javax.servlet.jsp.PageContext pageContext = javax.servlet.jsp.JspFactory.getDefaultFactory().getPageContext(this, request, response, null, true, 8192, true);
response.setHeader("Content-Type", "text/html; charset=gb2312"); out = pageContext.getOut(); JspWriter _originalOut = out;
javax.servlet.http.HttpSession session = request.getSession(true);
try { // error page try block response.setContentType("text/html; charset=gb2312"); _writeText(response, out, _wl_block0, _wl_block0Bytes); _writeText(response, out, _wl_block1, _wl_block1Bytes); //[ /grantandremove.jsp; Line: 20] try{ //[ /grantandremove.jsp; Line: 21] String id=request.getParameter("id"); //[ /grantandremove.jsp; Line: 22] session.setAttribute("selectid",id); //[ /grantandremove.jsp; Line: 23] baseclass basebean=new baseclass(); //[ /grantandremove.jsp; Line: 24] Context context=basebean.getContext(); //[ /grantandremove.jsp; Line: 25] Object ref = context.lookup("EmployeePermBean"); //[ /grantandremove.jsp; Line: 26] EmployeePermHome employeePermHome = (EmployeePermHome) PortableRemoteObject.narrow(ref, EmployeePermHome.class); //[ /grantandremove.jsp; Line: 27] EmployeePerm employeePerm=employeePermHome.create(); //[ /grantandremove.jsp; Line: 28] myemployee Myemployee=employeePerm.displaysingle(id); //[ /grantandremove.jsp; Line: 29] Vector totalperms=employeePerm.displayperm(); //[ /grantandremove.jsp; Line: 30] _writeText(response, out, _wl_block2, _wl_block2Bytes); out.print(String.valueOf(Myemployee.getName())); //[ /grantandremove.jsp; Line: 36] _writeText(response, out, _wl_block3, _wl_block3Bytes); out.print(String.valueOf(Myemployee.getLogin())); //[ /grantandremove.jsp; Line: 41] _writeText(response, out, _wl_block4, _wl_block4Bytes); Vector myperms=employeePerm.getmyperm(id); //[ /grantandremove.jsp; Line: 49] //[ /grantandremove.jsp; Line: 50] Vector restperm=basebean.getrestperm(myperms,totalperms); //[ /grantandremove.jsp; Line: 51] int mypermlength=myperms.size(); //[ /grantandremove.jsp; Line: 52] for(int i=0;i<myperms.size();i++) //[ /grantandremove.jsp; Line: 53] { //[ /grantandremove.jsp; Line: 54] myperm Myperm=(myperm)myperms.elementAt(i); //[ /grantandremove.jsp; Line: 55] if(Myperm!=null) //[ /grantandremove.jsp; Line: 56] { --mypermlength; //[ /grantandremove.jsp; Line: 57] //[ /grantandremove.jsp; Line: 58] //[ /grantandremove.jsp; Line: 58] _writeText(response, out, _wl_block5, _wl_block5Bytes); out.print(String.valueOf(Myperm.getCode())); //[ /grantandremove.jsp; Line: 61] _writeText(response, out, _wl_block6, _wl_block6Bytes); out.print(String.valueOf(Myperm.getDesc())); //[ /grantandremove.jsp; Line: 63] _writeText(response, out, _wl_block7, _wl_block7Bytes); //[ /grantandremove.jsp; Line: 66] } //[ /grantandremove.jsp; Line: 67] } //[ /grantandremove.jsp; Line: 68] if(mypermlength!=myperms.size()) //[ /grantandremove.jsp; Line: 69] { //[ /grantandremove.jsp; Line: 70] //[ /grantandremove.jsp; Line: 70] _writeText(response, out, _wl_block8, _wl_block8Bytes); } //[ /grantandremove.jsp; Line: 78] else //[ /grantandremove.jsp; Line: 79] { //[ /grantandremove.jsp; Line: 80] //[ /grantandremove.jsp; Line: 81] //[ /grantandremove.jsp; Line: 81] _writeText(response, out, _wl_block9, _wl_block9Bytes); } //[ /grantandremove.jsp; Line: 91] //[ /grantandremove.jsp; Line: 92] //[ /grantandremove.jsp; Line: 93] //[ /grantandremove.jsp; Line: 93] _writeText(response, out, _wl_block10, _wl_block10Bytes); if(restperm.size()==0) //[ /grantandremove.jsp; Line: 97] { //[ /grantandremove.jsp; Line: 98] //[ /grantandremove.jsp; Line: 98] _writeText(response, out, _wl_block11, _wl_block11Bytes); }else{ //[ /grantandremove.jsp; Line: 103] for(int i=0;i<restperm.size();i++) //[ /grantandremove.jsp; Line: 104] { //[ /grantandremove.jsp; Line: 105] allperm Restperm=(allperm)restperm.elementAt(i); //[ /grantandremove.jsp; Line: 106] //[ /grantandremove.jsp; Line: 107] //[ /grantandremove.jsp; Line: 107] _writeText(response, out, _wl_block12, _wl_block12Bytes); out.print(String.valueOf(Restperm.getCode())); //[ /grantandremove.jsp; Line: 110] _writeText(response, out, _wl_block13, _wl_block13Bytes); out.print(String.valueOf(Restperm.getDesc())); //[ /grantandremove.jsp; Line: 112] _writeText(response, out, _wl_block14, _wl_block14Bytes); //[ /grantandremove.jsp; Line: 115] } //[ /grantandremove.jsp; Line: 116] //[ /grantandremove.jsp; Line: 116] _writeText(response, out, _wl_block15, _wl_block15Bytes); } //[ /grantandremove.jsp; Line: 125] } //[ /grantandremove.jsp; Line: 126] catch(Exception e) //[ /grantandremove.jsp; Line: 127] {} //[ /grantandremove.jsp; Line: 128] //[ /grantandremove.jsp; Line: 128] _writeText(response, out, _wl_block16, _wl_block16Bytes); } catch (Throwable __ee) { while (out != null && out != _originalOut) out = pageContext.popBody(); ((weblogic.servlet.jsp.PageContextImpl)pageContext).handlePageException((Throwable)__ee); }
//before final close brace...
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -