You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2008/04/15 01:51:14 UTC
svn commit: r648066 - in /incubator/jspwiki/trunk: ChangeLog
src/com/ecyrd/jspwiki/Release.java
src/com/ecyrd/jspwiki/filters/FilterManager.java
Author: juanpablo
Date: Mon Apr 14 16:51:13 2008
New Revision: 648066
URL: http://svn.apache.org/viewvc?rev=648066&view=rev
Log:
* 2.7.0-svn-13
* [JSPWIKI-178] Patch from Jorge Ferrer to keep the order of search (WEB-INF
then classpath then file system) of filters.xml
Modified:
incubator/jspwiki/trunk/ChangeLog
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/filters/FilterManager.java
Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=648066&r1=648065&r2=648066&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Mon Apr 14 16:51:13 2008
@@ -1,3 +1,10 @@
+2008-04-15 Juan Pablo Santos <ju...@gmail.com>
+
+ * 2.7.0-svn-13
+
+ * [JSPWIKI-178] Patch from Jorge Ferrer to keep the order of search (WEB-INF
+ then classpath then file system) of filters.xml
+
2008-04-13 Janne Jalkanen <ja...@apache.org>
* 2.7.0-svn-12
Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java?rev=648066&r1=648065&r2=648066&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java Mon Apr 14 16:51:13 2008
@@ -77,7 +77,7 @@
* <p>
* If the build identifier is empty, it is not added.
*/
- public static final String BUILD = "12";
+ public static final String BUILD = "13";
/**
* This is the generic version string you should use
Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/filters/FilterManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/filters/FilterManager.java?rev=648066&r1=648065&r2=648066&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/filters/FilterManager.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/filters/FilterManager.java Mon Apr 14 16:51:13 2008
@@ -202,23 +202,36 @@
{
registerFilters();
- if( xmlFile == null )
- {
- if( m_engine.getServletContext() != null )
- {
- log.debug("Attempting to locate "+DEFAULT_XMLFILE+" from servlet context.");
- xmlStream = m_engine.getServletContext().getResourceAsStream( DEFAULT_XMLFILE );
- }
-
- if( xmlStream == null )
- {
- //just a fallback element to the old behaviour prior to 2.5.8
- log.debug("Attempting to locate filters.xml from class path.");
- xmlStream = getClass().getResourceAsStream( "/filters.xml" );
- }
- }
- else
- {
+ if( m_engine.getServletContext() != null )
+ {
+ log.debug("Attempting to locate "+DEFAULT_XMLFILE+" from servlet context.");
+ if( xmlFile == null )
+ {
+ xmlStream = m_engine.getServletContext().getResourceAsStream( DEFAULT_XMLFILE );
+ }
+ else
+ {
+ xmlStream = m_engine.getServletContext().getResourceAsStream( xmlFile );
+ }
+ }
+
+ if( xmlStream == null )
+ {
+ //just a fallback element to the old behaviour prior to 2.5.8
+ log.debug("Attempting to locate filters.xml from class path.");
+
+ if( xmlFile == null )
+ {
+ xmlStream = getClass().getResourceAsStream( "/filters.xml" );
+ }
+ else
+ {
+ xmlStream = getClass().getResourceAsStream( xmlFile );
+ }
+ }
+
+ if( (xmlStream == null) && (xmlFile != null) )
+ {
log.debug("Attempting to load property file "+xmlFile);
xmlStream = new FileInputStream( new File(xmlFile) );
}