ASF Bugzilla – Attachment 29737 Details for
Bug 54240
Configurable system level tagPlugins.xml
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for TagPluginManager.java
TagPluginManager.diff (text/plain), 2.47 KB, created by
Sheldon Shao
on 2012-12-10 08:00:42 UTC
(
hide
)
Description:
Patch for TagPluginManager.java
Filename:
MIME Type:
Creator:
Sheldon Shao
Created:
2012-12-10 08:00:42 UTC
Size:
2.47 KB
patch
obsolete
>Index: apache/jasper/compiler/TagPluginManager.java >=================================================================== >--- apache/jasper/compiler/TagPluginManager.java (revision 1416791) >+++ apache/jasper/compiler/TagPluginManager.java (working copy) >@@ -17,7 +17,10 @@ > > package org.apache.jasper.compiler; > >+import java.io.IOException; > import java.io.InputStream; >+import java.net.URL; >+import java.util.Enumeration; > import java.util.HashMap; > import java.util.Iterator; > >@@ -68,17 +71,60 @@ > }); > > } >- >+ >+ public static final String META_INF_JASPER_TAG_PLUGINS_XML = "META-INF/jasper/tagPlugins.xml"; >+ > private void init(ErrorDispatcher err) throws JasperException { > if (initialized) > return; > >+ tagPlugins = new HashMap<String, TagPlugin>(); >+ >+ Enumeration<URL> urls = null; >+ try { >+ urls = ctxt.getClassLoader().getResources(META_INF_JASPER_TAG_PLUGINS_XML); >+ } catch (IOException e) { >+ } >+ if (urls != null) { >+ while(urls.hasMoreElements()) { >+ URL url = urls.nextElement(); >+ InputStream is = null; >+ try { >+ is = url.openStream(); >+ loadTagPlugins(err, is); >+ } >+ catch(IOException ioe) { >+ throw new JasperException(ioe); >+ } >+ finally { >+ try { >+ is.close(); >+ } >+ catch(IOException ex) { >+ } >+ } >+ } >+ } > InputStream is = ctxt.getResourceAsStream(TAG_PLUGINS_XML); >- if (is == null) >- return; >+ if (is != null) { >+ try { >+ loadTagPlugins(err, is); >+ } >+ finally { >+ try { >+ is.close(); >+ } >+ catch(IOException ex) { >+ } >+ } >+ } > >- TreeNode root = (new ParserUtils()).parseXMLDocument(TAG_PLUGINS_XML, >- is); >+ initialized = true; >+ } >+ >+ private void loadTagPlugins(ErrorDispatcher err, InputStream is) >+ throws JasperException { >+ TreeNode root = (new ParserUtils()).parseXMLDocument(TAG_PLUGINS_XML, is); > if (root == null) { > return; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 54240
:
29687
| 29737 |
29738
|
29739
|
29740