安安 - JSP
type: channel
link: https://blog.90.vc/tag/JSP/
items: JSP探针

JSP探针
type: item
date: 2018-11-27T10:02:10+00:00
description: <%@ page contentType="text/html; charset=UTF-8" %> <%@page import="java.util.*"%> <%@page import="java.awt.image.BufferedImage"%> <%@page import="java.awt.*"%> <%@page import="java.io.*"%> <% long startTime = System.currentTimeMillis(); long startMem = Runtime.getRuntime().freeMemory(); %> <%! public class LibInfo { boolean supportJNDI = false; boolean supportJavaxSql = false; boolean supportJAF = false; boolean supportMail = false; boolean supportBeanUtils = false; boolean supportCommonLogging = false; boolean supportCommonCodec = false; boolean supportCommonCollection = false; boolean supportCommonDigester = false; boolean supportCommonLang = false; boolean supportJakartaRegExp = false; boolean supportLucene = false; boolean supportDom4j = false; boolean supportMmMysqlDriver = false; boolean supportComMysqlDriver = false; boolean supportImageProcessing = false; public LibInfo() { try { Class.forName("javax.naming.Name"); supportJNDI = true; } catch (ClassNotFoundException ex) {} try { Class.forName("javax.sql.DataSource"); supportJavaxSql = true; } catch (ClassNotFoundException ex) {} try { Class.forName("javax.activation.DataSource"); supportJAF = true; } catch (ClassNotFoundException ex) {} try { Class.forName("javax.mail.Message"); supportMail = true; } catch (ClassNotFoundException ex) {} try { Class.forName("org.apache.commons.beanutils.MethodUtils"); supportBeanUtils = true; } catch (ClassNotFoundException ex) {} try { Class.forName("org.apache.commons.logging.LogFactory"); supportCommonLogging = true; } catch (ClassNotFoundException ex) {} try { Class.forName("org.apache.commons.codec.Decoder"); supportCommonCodec = true; } catch (ClassNotFoundException ex) {} try { Class.forName("org.apache.commons.collections.ArrayStack"); supportCommonCollection = true; } catch (ClassNotFoundException ex) {} try { Class.forName("org.apache.commons.digester.Digester"); supportCommonDigester = true; } catch (ClassNotFoundException ex) {} try { Class.forName("org.apache.com…