javax.servlet.jsp.tagext.JspTag#org.apache.jasper.Constants源码实例Demo

下面列出了javax.servlet.jsp.tagext.JspTag#org.apache.jasper.Constants 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: Tomcat8-Source-Read   文件: TagHandlerPool.java
protected void init(ServletConfig config) {
    int maxSize = -1;
    String maxSizeS = getOption(config, OPTION_MAXSIZE, null);
    if (maxSizeS != null) {
        try {
            maxSize = Integer.parseInt(maxSizeS);
        } catch (Exception ex) {
            maxSize = -1;
        }
    }
    if (maxSize < 0) {
        maxSize = Constants.MAX_POOL_SIZE;
    }
    this.handlers = new Tag[maxSize];
    this.current = -1;
    instanceManager = InstanceManagerFactory.getInstanceManager(config);
}
 
源代码2 项目: Tomcat8-Source-Read   文件: ELFunctionMapper.java
/**
 * Convert a binary class name into a canonical one that can be used
 * when generating Java source code.
 *
 * @param className Binary class name
 * @return          Canonical equivalent
 */
private String getCanonicalName(String className) throws JasperException {
    Class<?> clazz;

    ClassLoader tccl;
    if (Constants.IS_SECURITY_ENABLED) {
        PrivilegedAction<ClassLoader> pa = new PrivilegedGetTccl();
        tccl = AccessController.doPrivileged(pa);
    } else {
        tccl = Thread.currentThread().getContextClassLoader();
    }

    try {
        clazz = Class.forName(className, false, tccl);
    } catch (ClassNotFoundException e) {
        throw new JasperException(e);
    }
    return clazz.getCanonicalName();
}
 
源代码3 项目: Tomcat8-Source-Read   文件: TldCache.java
public TldCache(ServletContext servletContext,
        Map<String, TldResourcePath> uriTldResourcePathMap,
        Map<TldResourcePath, TaglibXml> tldResourcePathTaglibXmlMap) {
    this.servletContext = servletContext;
    this.uriTldResourcePathMap.putAll(uriTldResourcePathMap);
    for (Entry<TldResourcePath, TaglibXml> entry : tldResourcePathTaglibXmlMap.entrySet()) {
        TldResourcePath tldResourcePath = entry.getKey();
        long lastModified[] = getLastModified(tldResourcePath);
        TaglibXmlCacheEntry cacheEntry = new TaglibXmlCacheEntry(
                entry.getValue(), lastModified[0], lastModified[1]);
        this.tldResourcePathTaglibXmlMap.put(tldResourcePath, cacheEntry);
    }
    boolean validate = Boolean.parseBoolean(
            servletContext.getInitParameter(Constants.XML_VALIDATION_TLD_INIT_PARAM));
    String blockExternalString = servletContext.getInitParameter(
            Constants.XML_BLOCK_EXTERNAL_INIT_PARAM);
    boolean blockExternal;
    if (blockExternalString == null) {
        blockExternal = true;
    } else {
        blockExternal = Boolean.parseBoolean(blockExternalString);
    }
    tldParser = new TldParser(true, validate, blockExternal);
}
 
源代码4 项目: Tomcat8-Source-Read   文件: Generator.java
private void writeNewInstance(String tagHandlerVar, String tagHandlerClassName) {
    out.printin(tagHandlerClassName);
    out.print(" ");
    out.print(tagHandlerVar);
    out.print(" = ");
    if (Constants.USE_INSTANCE_MANAGER_FOR_TAGS) {
        out.print("(");
        out.print(tagHandlerClassName);
        out.print(")");
        out.print("_jsp_getInstanceManager().newInstance(\"");
        out.print(tagHandlerClassName);
        out.println("\", this.getClass().getClassLoader());");
    } else {
        out.print("new ");
        out.print(tagHandlerClassName);
        out.println("();");
        out.printin("_jsp_getInstanceManager().newInstance(");
        out.print(tagHandlerVar);
        out.println(");");
    }
}
 
源代码5 项目: Tomcat8-Source-Read   文件: PageInfo.java
PageInfo(BeanRepository beanRepository, String jspFile, boolean isTagFile) {
    this.isTagFile = isTagFile;
    this.jspFile = jspFile;
    this.beanRepository = beanRepository;
    this.varInfoNames = new HashSet<>();
    this.taglibsMap = new HashMap<>();
    this.jspPrefixMapper = new HashMap<>();
    this.xmlPrefixMapper = new HashMap<>();
    this.nonCustomTagPrefixMap = new HashMap<>();
    this.imports = new Vector<>();
    this.dependants = new HashMap<>();
    this.includePrelude = new Vector<>();
    this.includeCoda = new Vector<>();
    this.pluginDcls = new Vector<>();
    this.prefixes = new HashSet<>();

    // Enter standard imports
    imports.addAll(Constants.STANDARD_IMPORTS);
}
 
源代码6 项目: Tomcat7.0.67   文件: PerThreadTagHandlerPool.java
@Override
protected void init(ServletConfig config) {
    maxSize = Constants.MAX_POOL_SIZE;
    String maxSizeS = getOption(config, OPTION_MAXSIZE, null);
    if (maxSizeS != null) {
        maxSize = Integer.parseInt(maxSizeS);
        if (maxSize < 0) {
            maxSize = Constants.MAX_POOL_SIZE;
        }
    }

    perThread = new ThreadLocal<PerThreadData>() {
        @Override
        protected PerThreadData initialValue() {
            PerThreadData ptd = new PerThreadData();
            ptd.handlers = new Tag[maxSize];
            ptd.current = -1;
            perThreadDataVector.addElement(ptd);
            return ptd;
        }
    };
}
 
源代码7 项目: Tomcat7.0.67   文件: JspRuntimeLibrary.java
public static void introspecthelper(Object bean, String prop,
                                    String value, ServletRequest request,
                                    String param, boolean ignoreMethodNF)
                                    throws JasperException
{
    if( Constants.IS_SECURITY_ENABLED ) {
        try {
            PrivilegedIntrospectHelper dp =
                new PrivilegedIntrospectHelper(
                    bean,prop,value,request,param,ignoreMethodNF);
            AccessController.doPrivileged(dp);
        } catch( PrivilegedActionException pe) {
            Exception e = pe.getException();
            throw (JasperException)e;
        }
    } else {
        internalIntrospecthelper(
            bean,prop,value,request,param,ignoreMethodNF);
    }
}
 
源代码8 项目: Tomcat7.0.67   文件: ELFunctionMapper.java
/**
 * Convert a binary class name into a canonical one that can be used
 * when generating Java source code.
 * 
 * @param className Binary class name
 * @return          Canonical equivalent
 */
private String getCanonicalName(String className) throws JasperException {
    Class<?> clazz;
    
    ClassLoader tccl;
    if (Constants.IS_SECURITY_ENABLED) {
        PrivilegedAction<ClassLoader> pa = new PrivilegedGetTccl();
        tccl = AccessController.doPrivileged(pa);
    } else {
        tccl = Thread.currentThread().getContextClassLoader();
    }

    try {
        clazz = Class.forName(className, false, tccl);
    } catch (ClassNotFoundException e) {
        throw new JasperException(e);
    }
    return clazz.getCanonicalName();
}
 
源代码9 项目: packagedrone   文件: TagHandlerPool.java
protected void init( ServletConfig config ) {
    int maxSize=-1;
    String maxSizeS=getOption(config, OPTION_MAXSIZE, null);
    if( maxSizeS != null ) {
        try {
            maxSize=Integer.parseInt(maxSizeS);
        } catch( Exception ex) {
            maxSize=-1;
        }
    }
    if( maxSize <0  ) {
        maxSize=Constants.MAX_POOL_SIZE;
    }
    this.handlers = new JspTag[maxSize];
    this.current = -1;

    this.resourceInjector = (ResourceInjector)
        config.getServletContext().getAttribute(
            Constants.JSP_RESOURCE_INJECTOR_CONTEXT_ATTRIBUTE);
}
 
源代码10 项目: Tomcat7.0.67   文件: Generator.java
private void writeNewInstance(String tagHandlerVar, String tagHandlerClassName) {
    if (Constants.USE_INSTANCE_MANAGER_FOR_TAGS) {
        out.printin(tagHandlerClassName);
        out.print(" ");
        out.print(tagHandlerVar);
        out.print(" = (");
        out.print(tagHandlerClassName);
        out.print(")");
        out.print("_jsp_getInstanceManager().newInstance(\"");
        out.print(tagHandlerClassName);
        out.println("\", this.getClass().getClassLoader());");
    } else {
        out.printin(tagHandlerClassName);
        out.print(" ");
        out.print(tagHandlerVar);
        out.print(" = (");
        out.print("new ");
        out.print(tagHandlerClassName);
        out.println("());");
        out.printin("_jsp_getInstanceManager().newInstance(");
        out.print(tagHandlerVar);
        out.println(");");
    }
}
 
源代码11 项目: Tomcat7.0.67   文件: PageInfo.java
PageInfo(BeanRepository beanRepository, String jspFile, boolean isTagFile) {
    this.isTagFile = isTagFile;
    this.jspFile = jspFile;
    this.beanRepository = beanRepository;
    this.varInfoNames = new HashSet<String>();
    this.taglibsMap = new HashMap<String, TagLibraryInfo>();
    this.jspPrefixMapper = new HashMap<String, String>();
    this.xmlPrefixMapper = new HashMap<String, LinkedList<String>>();
    this.nonCustomTagPrefixMap = new HashMap<String, Mark>();
    this.imports = new Vector<String>();
    this.dependants = new HashMap<String,Long>();
    this.includePrelude = new Vector<String>();
    this.includeCoda = new Vector<String>();
    this.pluginDcls = new Vector<String>();
    this.prefixes = new HashSet<String>();

    // Enter standard imports
    imports.addAll(Constants.STANDARD_IMPORTS);
}
 
源代码12 项目: tomcatsrc   文件: PerThreadTagHandlerPool.java
@Override
protected void init(ServletConfig config) {
    maxSize = Constants.MAX_POOL_SIZE;
    String maxSizeS = getOption(config, OPTION_MAXSIZE, null);
    if (maxSizeS != null) {
        maxSize = Integer.parseInt(maxSizeS);
        if (maxSize < 0) {
            maxSize = Constants.MAX_POOL_SIZE;
        }
    }

    perThread = new ThreadLocal<PerThreadData>() {
        @Override
        protected PerThreadData initialValue() {
            PerThreadData ptd = new PerThreadData();
            ptd.handlers = new Tag[maxSize];
            ptd.current = -1;
            perThreadDataVector.addElement(ptd);
            return ptd;
        }
    };
}
 
源代码13 项目: tomcatsrc   文件: TagHandlerPool.java
protected void init(ServletConfig config) {
    int maxSize = -1;
    String maxSizeS = getOption(config, OPTION_MAXSIZE, null);
    if (maxSizeS != null) {
        try {
            maxSize = Integer.parseInt(maxSizeS);
        } catch (Exception ex) {
            maxSize = -1;
        }
    }
    if (maxSize < 0) {
        maxSize = Constants.MAX_POOL_SIZE;
    }
    this.handlers = new Tag[maxSize];
    this.current = -1;
    instanceManager = InstanceManagerFactory.getInstanceManager(config);
}
 
源代码14 项目: tomcatsrc   文件: PageInfo.java
PageInfo(BeanRepository beanRepository, String jspFile, boolean isTagFile) {
    this.isTagFile = isTagFile;
    this.jspFile = jspFile;
    this.beanRepository = beanRepository;
    this.varInfoNames = new HashSet<String>();
    this.taglibsMap = new HashMap<String, TagLibraryInfo>();
    this.jspPrefixMapper = new HashMap<String, String>();
    this.xmlPrefixMapper = new HashMap<String, LinkedList<String>>();
    this.nonCustomTagPrefixMap = new HashMap<String, Mark>();
    this.imports = new Vector<String>();
    this.dependants = new HashMap<String,Long>();
    this.includePrelude = new Vector<String>();
    this.includeCoda = new Vector<String>();
    this.pluginDcls = new Vector<String>();
    this.prefixes = new HashSet<String>();

    // Enter standard imports
    imports.addAll(Constants.STANDARD_IMPORTS);
}
 
源代码15 项目: tomcatsrc   文件: JspFactoryImpl.java
@Override
public PageContext getPageContext(Servlet servlet, ServletRequest request,
        ServletResponse response, String errorPageURL, boolean needsSession,
        int bufferSize, boolean autoflush) {

    if( Constants.IS_SECURITY_ENABLED ) {
        PrivilegedGetPageContext dp = new PrivilegedGetPageContext(
                this, servlet, request, response, errorPageURL,
                needsSession, bufferSize, autoflush);
        return AccessController.doPrivileged(dp);
    } else {
        return internalGetPageContext(servlet, request, response,
                errorPageURL, needsSession,
                bufferSize, autoflush);
    }
}
 
源代码16 项目: Tomcat8-Source-Read   文件: SecurityUtil.java
/**
 * Return the <code>SecurityManager</code> only if Security is enabled AND
 * package protection mechanism is enabled.
 * @return <code>true</code> if package protection is enabled
 */
public static boolean isPackageProtectionEnabled(){
    if (packageDefinitionEnabled && Constants.IS_SECURITY_ENABLED){
        return true;
    }
    return false;
}
 
源代码17 项目: Tomcat8-Source-Read   文件: JasperInitializer.java
@Override
public void onStartup(Set<Class<?>> types, ServletContext context) throws ServletException {
    if (log.isDebugEnabled()) {
        log.debug(Localizer.getMessage(MSG + ".onStartup", context.getServletContextName()));
    }

    // Setup a simple default Instance Manager
    if (context.getAttribute(InstanceManager.class.getName())==null) {
        context.setAttribute(InstanceManager.class.getName(), new SimpleInstanceManager());
    }

    boolean validate = Boolean.parseBoolean(
            context.getInitParameter(Constants.XML_VALIDATION_TLD_INIT_PARAM));
    String blockExternalString = context.getInitParameter(
            Constants.XML_BLOCK_EXTERNAL_INIT_PARAM);
    boolean blockExternal;
    if (blockExternalString == null) {
        blockExternal = true;
    } else {
        blockExternal = Boolean.parseBoolean(blockExternalString);
    }

    // scan the application for TLDs
    TldScanner scanner = newTldScanner(context, true, validate, blockExternal);
    try {
        scanner.scan();
    } catch (IOException | SAXException e) {
        throw new ServletException(e);
    }

    // add any listeners defined in TLDs
    for (String listener : scanner.getListeners()) {
        context.addListener(listener);
    }

    context.setAttribute(TldCache.SERVLET_CONTEXT_ATTRIBUTE_NAME,
            new TldCache(context, scanner.getUriTldResourcePathMap(),
                    scanner.getTldResourcePathTaglibXmlMap()));
}
 
源代码18 项目: Tomcat8-Source-Read   文件: JspCServletContext.java
/**
 * Create a new instance of this ServletContext implementation.
 *
 * @param aLogWriter PrintWriter which is used for <code>log()</code> calls
 * @param aResourceBaseURL Resource base URL
 * @param classLoader   Class loader for this {@link ServletContext}
 * @param validate      Should a validating parser be used to parse web.xml?
 * @param blockExternal Should external entities be blocked when parsing
 *                      web.xml?
 * @throws JasperException An error occurred building the merged web.xml
 */
public JspCServletContext(PrintWriter aLogWriter, URL aResourceBaseURL,
        ClassLoader classLoader, boolean validate, boolean blockExternal)
        throws JasperException {

    myAttributes = new HashMap<>();
    myParameters.put(Constants.XML_BLOCK_EXTERNAL_INIT_PARAM,
            String.valueOf(blockExternal));
    myLogWriter = aLogWriter;
    myResourceBaseURL = aResourceBaseURL;
    this.loader = classLoader;
    this.webXml = buildMergedWebXml(validate, blockExternal);
    jspConfigDescriptor = webXml.getJspConfigDescriptor();
}
 
源代码19 项目: Tomcat8-Source-Read   文件: TagHandlerPool.java
/**
 * Gets the next available tag handler from this tag handler pool,
 * instantiating one if this tag handler pool is empty.
 *
 * @param handlerClass
 *            Tag handler class
 * @return Reused or newly instantiated tag handler
 * @throws JspException
 *             if a tag handler cannot be instantiated
 */
public Tag get(Class<? extends Tag> handlerClass) throws JspException {
    Tag handler;
    synchronized (this) {
        if (current >= 0) {
            handler = handlers[current--];
            return handler;
        }
    }

    // Out of sync block - there is no need for other threads to
    // wait for us to construct a tag for this thread.
    try {
        if (Constants.USE_INSTANCE_MANAGER_FOR_TAGS) {
            return (Tag) instanceManager.newInstance(
                    handlerClass.getName(), handlerClass.getClassLoader());
        } else {
            Tag instance = handlerClass.getConstructor().newInstance();
            instanceManager.newInstance(instance);
            return instance;
        }
    } catch (Exception e) {
        Throwable t = ExceptionUtils.unwrapInvocationTargetException(e);
        ExceptionUtils.handleThrowable(t);
        throw new JspException(e.getMessage(), t);
    }
}
 
源代码20 项目: Tomcat8-Source-Read   文件: JspFactoryImpl.java
@Override
public void releasePageContext(PageContext pc) {
    if( pc == null )
        return;
    if( Constants.IS_SECURITY_ENABLED ) {
        PrivilegedReleasePageContext dp = new PrivilegedReleasePageContext(
                this,pc);
        AccessController.doPrivileged(dp);
    } else {
        internalReleasePageContext(pc);
    }
}
 
源代码21 项目: Tomcat8-Source-Read   文件: JspFactoryImpl.java
@Override
public JspApplicationContext getJspApplicationContext(
        final ServletContext context) {
    if (Constants.IS_SECURITY_ENABLED) {
        return AccessController.doPrivileged(
                new PrivilegedAction<JspApplicationContext>() {
            @Override
            public JspApplicationContext run() {
                return JspApplicationContextImpl.getInstance(context);
            }
        });
    } else {
        return JspApplicationContextImpl.getInstance(context);
    }
}
 
源代码22 项目: Tomcat8-Source-Read   文件: ELContextImpl.java
public static ELResolver getDefaultResolver(ExpressionFactory factory) {
    if (Constants.IS_SECURITY_ENABLED) {
        CompositeELResolver defaultResolver = new CompositeELResolver();
        defaultResolver.add(factory.getStreamELResolver());
        defaultResolver.add(new StaticFieldELResolver());
        defaultResolver.add(new MapELResolver());
        defaultResolver.add(new ResourceBundleELResolver());
        defaultResolver.add(new ListELResolver());
        defaultResolver.add(new ArrayELResolver());
        defaultResolver.add(new BeanELResolver());
        return defaultResolver;
    } else {
        return DefaultResolver;
    }
}
 
源代码23 项目: Tomcat8-Source-Read   文件: JspDocumentParser.java
public JspDocumentParser(
    ParserController pc,
    String path,
    boolean isTagFile,
    boolean directivesOnly) {
    this.parserController = pc;
    this.ctxt = pc.getJspCompilationContext();
    this.pageInfo = pc.getCompiler().getPageInfo();
    this.err = pc.getCompiler().getErrorDispatcher();
    this.path = path;
    this.isTagFile = isTagFile;
    this.directivesOnly = directivesOnly;
    this.isTop = true;

    String blockExternalString = ctxt.getServletContext().getInitParameter(
            Constants.XML_BLOCK_EXTERNAL_INIT_PARAM);
    boolean blockExternal;
    if (blockExternalString == null) {
        blockExternal = true;
    } else {
        blockExternal = Boolean.parseBoolean(blockExternalString);
    }

    this.entityResolver = new LocalResolver(
            DigesterFactory.SERVLET_API_PUBLIC_IDS,
            DigesterFactory.SERVLET_API_SYSTEM_IDS,
            blockExternal);
}
 
源代码24 项目: Tomcat8-Source-Read   文件: JspUtil.java
private static String getClassNameBase(String urn) {
    StringBuilder base =
            new StringBuilder(Constants.TAG_FILE_PACKAGE_NAME + ".meta.");
    if (urn != null) {
        base.append(makeJavaPackage(urn));
        base.append('.');
    }
    return base.toString();
}
 
源代码25 项目: Tomcat8-Source-Read   文件: Node.java
/**
 * Generates a new temporary variable name.
 *
 * @return The name to use for the temporary variable
 */
public String nextTemporaryVariableName() {
    if (parentRoot == null) {
        return Constants.TEMP_VARIABLE_NAME_PREFIX + (tempSequenceNumber++);
    } else {
        return parentRoot.nextTemporaryVariableName();
    }

}
 
源代码26 项目: Tomcat8-Source-Read   文件: JspRuntimeContext.java
/**
 * Method used to initialize classpath for compiles.
 * @return the compilation classpath
 */
private String initClassPath() {

    StringBuilder cpath = new StringBuilder();

    if (parentClassLoader instanceof URLClassLoader) {
        URL [] urls = ((URLClassLoader)parentClassLoader).getURLs();

        for (int i = 0; i < urls.length; i++) {
            // Tomcat can use URLs other than file URLs. However, a protocol
            // other than file: will generate a bad file system path, so
            // only add file: protocol URLs to the classpath.

            if (urls[i].getProtocol().equals("file") ) {
                try {
                    // Need to decode the URL, primarily to convert %20
                    // sequences back to spaces
                    String decoded = urls[i].toURI().getPath();
                    cpath.append(decoded + File.pathSeparator);
                } catch (URISyntaxException e) {
                    log.warn(Localizer.getMessage("jsp.warning.classpathUrl"), e);
                }
            }
        }
    }

    cpath.append(options.getScratchDir() + File.pathSeparator);

    String cp = (String) context.getAttribute(Constants.SERVLET_CLASSPATH);
    if (cp == null || cp.equals("")) {
        cp = options.getClassPath();
    }

    String path = cpath.toString() + cp;

    if(log.isDebugEnabled()) {
        log.debug("Compilation classpath initialized: " + path);
    }
    return path;
}
 
源代码27 项目: Tomcat8-Source-Read   文件: TestPageContextImpl.java
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
        throws ServletException, IOException {

    PageContext pageContext = JspFactory.getDefaultFactory().getPageContext(
            this, req, resp, null, false, JspWriter.DEFAULT_BUFFER, true);
    JspWriter out = pageContext.getOut();
    if (Constants.DEFAULT_BUFFER_SIZE == out.getBufferSize()) {
        resp.getWriter().println("OK");
    } else {
        resp.getWriter().println("FAIL");
    }
}
 
源代码28 项目: Tomcat7.0.67   文件: SecurityUtil.java
/**
 * Return the <code>SecurityManager</code> only if Security is enabled AND
 * package protection mechanism is enabled.
 */
public static boolean isPackageProtectionEnabled(){
    if (packageDefinitionEnabled && Constants.IS_SECURITY_ENABLED){
        return true;
    }
    return false;
}
 
源代码29 项目: Tomcat7.0.67   文件: Util.java
/**
 * Strips a servlet session ID from <tt>url</tt>.  The session ID
 * is encoded as a URL "path parameter" beginning with "jsessionid=".
 * We thus remove anything we find between ";jsessionid=" (inclusive)
 * and either EOS or a subsequent ';' (exclusive).
 * 
 * taken from org.apache.taglibs.standard.tag.common.core.ImportSupport
 */
public static String stripSession(String url) {
    StringBuilder u = new StringBuilder(url);
    int sessionStart;
    while ((sessionStart = u.toString().indexOf(";" + Constants.SESSION_PARAMETER_NAME + "=")) != -1) {
        int sessionEnd = u.toString().indexOf(';', sessionStart + 1);
        if (sessionEnd == -1)
            sessionEnd = u.toString().indexOf('?', sessionStart + 1);
        if (sessionEnd == -1) // still
            sessionEnd = u.length();
        u.delete(sessionStart, sessionEnd);
    }
    return u.toString();
}
 
源代码30 项目: packagedrone   文件: JspRuntimeContext.java
/**
    * Method used to initialize classpath for compiles.
    */
   private void initClassPath() {

       /* Classpath can be specified in one of two ways, depending on
          whether the compilation is embedded or invoked from Jspc.
          1. Calculated by the web container, and passed to Jasper in the
             context attribute.
          2. Jspc directly invoke JspCompilationContext.setClassPath, in
             case the classPath initialzed here is ignored.
       */

       StringBuilder cpath = new StringBuilder();
       String sep = System.getProperty("path.separator");

cpath.append(options.getScratchDir() + sep);

       String cp = (String) context.getAttribute(Constants.SERVLET_CLASSPATH);
       if (cp == null || cp.equals("")) {
           cp = options.getClassPath();
       }

       if (cp != null) {
           classpath = cpath.toString() + cp;
       }

       // START GlassFish Issue 845
       if (classpath != null) {
           try {
               classpath = URLDecoder.decode(classpath, "UTF-8");
           } catch (UnsupportedEncodingException e) {
               if (log.isLoggable(Level.FINE))
                   log.log(Level.FINE,
                           "Exception decoding classpath : " + classpath, e);
           }
       }
       // END GlassFish Issue 845
   }