一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

jsp 针探代码

时间:2009-09-29 编辑:简简单单 来源:一聚教程网

jsp 针探代码

<%@ page contentType="text/html; charset=gb2312" %>
<%@page import="java.util.*"%>
<%@page import="java.awt.image.BufferedImage"%>
<%@page import="java.awt.*"%>
<%@page import="java.io.*"%>
<%
/*
程序作者:couvol
联系QQ:263645928
*/
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.commons.lang.SystemUtils");
            supportCommonLang = true;
        } catch (ClassNotFoundException ex) {}

        try {
            Class.forName("org.apache.regexp.RE");
            supportJakartaRegExp = true;
        } catch (ClassNotFoundException ex) {}

        try {
            Class.forName("org.apache.lucene.index.IndexWriter");
            supportLucene = true;
        } catch (ClassNotFoundException ex) {}

        try {
            Class.forName("org.dom4j.Document");
            supportDom4j = true;
        } catch (ClassNotFoundException ex) {}

        try {
            Class.forName("org.gjt.mm.mysql.Driver");
            supportMmMysqlDriver = true;
        } catch (ClassNotFoundException ex) {}

        try {
            Class.forName("com.mysql.jdbc.Driver");
            supportComMysqlDriver = true;
        } catch (ClassNotFoundException ex) {}

        try {
            BufferedImage bufferedImage = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
            Graphics2D g = bufferedImage.createGraphics();
            g.drawLine(0, 0, 10, 10);
            g.dispose();// free resource

            supportImageProcessing = true;
        } catch (Throwable ex) {}

    }

    public boolean isSupportJAF() {
        return supportJAF;
    }

    public boolean isSupportJavaxSql() {
        return supportJavaxSql;
    }

    public boolean isSupportJNDI() {
        return supportJNDI;
    }

    public boolean isSupportMail() {
        return supportMail;
    }

    public boolean isSupportBeanUtils() {
        return supportBeanUtils;
    }

    public boolean isSupportCommonLogging() {
        return supportCommonLogging;
    }

    public boolean isSupportCommonCodec() {
        return supportCommonCodec;
    }

    public boolean isSupportCommonCollection() {
        return supportCommonCollection;
    }

    public boolean isSupportCommonDigester() {
        return supportCommonDigester;
    }

    public boolean isSupportCommonLang() {
        return supportCommonLang;
    }

    public boolean isSupportJakartaRegExp() {
        return supportJakartaRegExp;
    }

    public boolean isSupportLucene() {
        return supportLucene;
    }

    public boolean isSupportDom4j() {
        return supportDom4j;
    }

    public boolean isSupportMmMysqlDriver() {
        return supportMmMysqlDriver;
    }

    public boolean isSupportComMysqlDriver() {
        return supportComMysqlDriver;
    }

    public boolean isSupportImageProcessing() {
        return supportImageProcessing;
    }

}
%>
http://www.w3.org/TR/html4/loose.dtd">


淘特JSP探针




 
   
 
淘特JSP探针

Request Variables:



 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
   
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
   
Property Value
 getAuthType <%=request.getAuthType()%>
 getCharacterEncoding <%=request.getCharacterEncoding()%>
 getContentLength <%=request.getContentLength()%>
 getContentType <%=request.getContentType()%>
 getContextPath <%=request.getContextPath()%>
 getLocale <%=request.getLocale()%>
 getLocales <%=request.getLocales()%>
 getMethod <%=request.getMethod()%>
 getPathInfo <%=request.getPathInfo()%>
 getPathTranslated <%=request.getPathTranslated()%>
 getProtocol <%=request.getProtocol()%>
 getReader <%=request.getReader()%>
 getRealPath <%=request.getRealPath(".")%>
 getRemoteAddr <%=request.getRemoteAddr()%>
 getRemoteHost <%=request.getRemoteHost()%>
 getRemoteUser <%=request.getRemoteUser()%>
 getRequestDispatcher <%=request.getRequestDispatcher("/")%>
 getRequestURI <%=request.getRequestURI()%>
 getRequestURL <%=request.getRequestURL()%>
 getServerName <%=request.getServerName()%>
 getServerPort <%=request.getServerPort()%>
 getServletPath <%=request.getServletPath()%>
 getUserPrincipal <%=request.getUserPrincipal()%>

Session Variables:



 
   
   
 
  <%
   Enumeration e = session.getAttributeNames();
    while (e.hasMoreElements()) {
            String name = (String)e.nextElement();
            String value = (String)session.getAttribute(name);           
  %>
 
   
   
 
  <%
   }
  %>
Property Value
 <%=name%> <%=value%>

Application Variables:



 
   
   
 
  <%
  e = application.getAttributeNames();
  while (e.hasMoreElements()) {
   String name = (String)e.nextElement();           
  %>
 
   
   
 
  <%
   }
  %>
Property Value
 <%=name%> <%=application.getAttribute(name)%>

Cookies Variables:



 
   
   
 
  <%
   Cookie[] cos=request.getCookies();
    if(cos!=null){
  for(int i=0;i   {  
  %>
 

   
   
 
  <%
  }
   }
  %>
Property Value
 <%=cos[i].getName()%> <%=cos[i].getValue()%>

Server Variables:



 
   
   
 
  <%
  Properties props=System.getProperties();
  Iterator iter=props.keySet().iterator();
  while(iter.hasNext())
  {
   String key=(String)iter.next();
  %>
 
   
   
 
  <%
   }
  %>
Property Value
 <%=key%> <%=props.get(key)%>

Lib Info


<%
LibInfo lib=new LibInfo();
%>

 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
Property Value
supportJNDI <%=lib.isSupportJNDI()%>
supportJavaxSql <%=lib.isSupportJavaxSql()%>
supportJAF <%=lib.isSupportJAF()%>
supportMail <%=lib.isSupportMail()%>
supportBeanUtils <%=lib.isSupportBeanUtils()%>
supportCommonLogging <%=lib.isSupportCommonLogging()%>
supportCommonCodec <%=lib.isSupportCommonCodec()%>
supportCommonCollection <%=lib.isSupportCommonCollection()%>
supportCommonDigester <%=lib.isSupportCommonDigester()%>
supportCommonLang <%=lib.isSupportCommonLang()%>
supportJakartaRegExp <%=lib.isSupportJakartaRegExp()%>
supportLucene <%=lib.isSupportLucene()%>
supportDom4j <%=lib.isSupportDom4j()%>
supportMmMysqlDriver <%=lib.isSupportMmMysqlDriver()%>
supportComMysqlDriver <%=lib.isSupportComMysqlDriver()%>
supportImageProcessing <%=lib.isSupportImageProcessing()%>






<%
long endMem = Runtime.getRuntime().freeMemory();
long total= Runtime.getRuntime().maxMemory();
out.println("Total Memory:"+total);
out.println("Start Memory:"+startMem);
out.println("End Memory:"+endMem);
out.println("Use memory: "+ (startMem - endMem));
long endTime = System.currentTimeMillis();
out.println("Use Time: "+ (endTime-startTime));
%>

热门栏目