Author: ssmiweve Date: 2008-04-18 12:24:08 +0200 (Fri, 18 Apr 2008) New Revision: 6485
Modified: branches/2.17/ branches/2.17/data-model-api/src/main/java/no/sesat/search/datamodel/generic/StringDataObject.java branches/2.17/site-spi/src/main/java/no/sesat/search/site/Site.java branches/2.17/site-spi/src/main/java/no/sesat/search/site/config/AbstractResourceLoader.java branches/2.17/site-spi/src/main/java/no/sesat/search/site/config/SpiClassLoader.java branches/2.17/war/src/main/java/no/sesat/search/http/filters/UrlRewriteFilter.java branches/2.17/war/src/main/webapp/WEB-INF/urlrewrite.xml Log: Merged revisions 6466-6484 via svnmerge from http://sesat.no/svn/sesat-kernel/branches/2.16 ........ r6476 | ssmiweve | 2008-04-17 12:06:57 +0200 (Thu, 17 Apr 2008) | 1 line javadoc ........ r6477 | ssmiweve | 2008-04-17 12:47:06 +0200 (Thu, 17 Apr 2008) | 1 line javadoc -- from http://sesat.no/pipermail/kernel-development/2008-April/000059.html ........ r6478 | ssmiweve | 2008-04-17 12:47:17 +0200 (Thu, 17 Apr 2008) | 1 line http://sesat.no/pipermail/kernel-development/2008-April/000059.html ........ r6479 | ssmiweve | 2008-04-17 22:58:05 +0200 (Thu, 17 Apr 2008) | 1 line SEARCH-4638 - Swedish request using generic.sesam without explicit port ........ r6480 | ssmiweve | 2008-04-17 22:59:15 +0200 (Thu, 17 Apr 2008) | 1 line javadoc ........ r6481 | ssmiweve | 2008-04-17 23:13:51 +0200 (Thu, 17 Apr 2008) | 1 line SEARCH-4638 - Swedish request using generic.sesam without explicit port ........ Property changes on: branches/2.17 ___________________________________________________________________ Name: svnmerge-integrated - /branches/2.10:1-4690,4692-4745 /branches/2.11:1-4933 /branches/2.12:1-5051,5053-5106 /branches/2.13:1-5378 /branches/2.14:1-5508 /branches/2.15:1-5995 /branches/2.16:1-6465 /branches/2.6:1-3877 /branches/2.7:1-4160 /branches/2.8:1-4446 /branches/2.9:1-4626 /branches/MAP_SEARCHv2:1-4544 + /branches/2.10:1-4690,4692-4745 /branches/2.11:1-4933 /branches/2.12:1-5051,5053-5106 /branches/2.13:1-5378 /branches/2.14:1-5508 /branches/2.15:1-5995 /branches/2.16:1-6484 /branches/2.6:1-3877 /branches/2.7:1-4160 /branches/2.8:1-4446 /branches/2.9:1-4626 /branches/MAP_SEARCHv2:1-4544 Modified: branches/2.17/data-model-api/src/main/java/no/sesat/search/datamodel/generic/StringDataObject.java =================================================================== --- branches/2.17/data-model-api/src/main/java/no/sesat/search/datamodel/generic/StringDataObject.java 2008-04-18 08:31:32 UTC (rev 6484) +++ branches/2.17/data-model-api/src/main/java/no/sesat/search/datamodel/generic/StringDataObject.java 2008-04-18 10:24:08 UTC (rev 6485) @@ -26,32 +26,38 @@ import static no.sesat.search.datamodel.access.ControlLevel.VIEW_CONSTRUCTION; import no.sesat.search.datamodel.access.AccessDisallow; -/** +/** DataObject wrapping a String providing getters for url encoded and xml escaped variants. + * + * String should not be used directly during the rendering stage. + * Hence getString has the annontation <code>@AccessDisallow({VIEW_CONSTRUCTION})</code>. + * * * @author <a href="mailto:[EMAIL PROTECTED]">Mck</a> * @version <tt>$Id$</tt> */ @DataObject public interface StringDataObject extends Serializable{ - /** - * + /** The plain value of the string. + * Disallowed during rendering for security reasons. * @return */ @AccessDisallow({VIEW_CONSTRUCTION}) String getString(); - /** + /** The UTF8 url encoded variant of the string. + * Encoding must meet those requirements stated in java.net.URLEncoder * - * @return + * @return UTF8 url encoded variant of the string. */ String getUtf8UrlEncoded(); - /** + /** The ISO-88591 url encoded variant of the string. + * Encoding must meet those requirements stated in java.net.URLEncoder * - * @return + * @return ISO-88591 url encoded variant of the string. */ String getIso88591UrlEncoded(); - /** + /** The xml escaped variant of the string. * - * @return + * @return xmlescaped variant of the string. */ String getXmlEscaped(); } Modified: branches/2.17/site-spi/src/main/java/no/sesat/search/site/Site.java =================================================================== --- branches/2.17/site-spi/src/main/java/no/sesat/search/site/Site.java 2008-04-18 08:31:32 UTC (rev 6484) +++ branches/2.17/site-spi/src/main/java/no/sesat/search/site/Site.java 2008-04-18 10:24:08 UTC (rev 6485) @@ -164,7 +164,9 @@ LOG.debug(siteName + " parent is " + parentSiteName); - if(constructingDefault){ + if(constructingDefault || DEFAULT.getName().equals(cxtName)){ + // dont let the original DEFAULT have a parent + // OR let a port-explicit generic.sesam have a parent. parent = null; }else{ Modified: branches/2.17/site-spi/src/main/java/no/sesat/search/site/config/AbstractResourceLoader.java =================================================================== --- branches/2.17/site-spi/src/main/java/no/sesat/search/site/config/AbstractResourceLoader.java 2008-04-18 08:31:32 UTC (rev 6484) +++ branches/2.17/site-spi/src/main/java/no/sesat/search/site/config/AbstractResourceLoader.java 2008-04-18 10:24:08 UTC (rev 6485) @@ -38,6 +38,7 @@ import no.sesat.search.site.Site; import no.sesat.search.site.SiteContext; import org.apache.log4j.Logger; +import org.apache.log4j.MDC; import org.w3c.dom.Document; import org.xml.sax.InputSource; import org.xml.sax.SAXException; @@ -261,6 +262,10 @@ */ public void run() { + // Inheriting from Site & UniqueId from parent thread is meaningless in a thread pool. + MDC.put(Site.NAME_KEY, context.getSite()); + MDC.remove("UNIQUE_ID"); + switch(resourceType.getPolymorphism()){ case UP_HEIRARCHY: // Properties inherent through the fallback process. Keys are *not* overridden. Modified: branches/2.17/site-spi/src/main/java/no/sesat/search/site/config/SpiClassLoader.java =================================================================== --- branches/2.17/site-spi/src/main/java/no/sesat/search/site/config/SpiClassLoader.java 2008-04-18 08:31:32 UTC (rev 6484) +++ branches/2.17/site-spi/src/main/java/no/sesat/search/site/config/SpiClassLoader.java 2008-04-18 10:24:08 UTC (rev 6485) @@ -1,4 +1,4 @@ -/* Copyright (2006-2007) Schibsted Søk AS +/* Copyright (2006-2008) Schibsted Søk AS * This file is part of SESAT. * * SESAT is free software: you can redistribute it and/or modify @@ -61,9 +61,6 @@ parentSite = site.getParent() != null ? parentSiteClassLoader() : this.getClass().getClassLoader(); } - /** - * [EMAIL PROTECTED] - */ @Override public String toString() { return CLASS_LOADER_FOR + site.toString() + ", " + spi + "=>" + spi.getParent() +')'; @@ -111,7 +108,6 @@ return jarName; } - /** [EMAIL PROTECTED] */ @Override protected Class<?> findClass(final String className) throws ClassNotFoundException { Modified: branches/2.17/war/src/main/java/no/sesat/search/http/filters/UrlRewriteFilter.java =================================================================== --- branches/2.17/war/src/main/java/no/sesat/search/http/filters/UrlRewriteFilter.java 2008-04-18 08:31:32 UTC (rev 6484) +++ branches/2.17/war/src/main/java/no/sesat/search/http/filters/UrlRewriteFilter.java 2008-04-18 10:24:08 UTC (rev 6485) @@ -34,6 +34,9 @@ /** Override of tuckey's UrlRewriteFilter that supplies an inputstream to the skins's urlrewrite.xml * instead of the default /WEB-INF/urlrewrite.xml + * + * Make sure that any urlrewrite.xml has the attributes in the root element: + * <urlrewrite decode-using="null" use-query-string="true"> * * @author <a href="mailto:[EMAIL PROTECTED]">Mck</a> * @version <tt>$Id$</tt> @@ -52,7 +55,6 @@ // Public -------------------------------------------------------- - /** [EMAIL PROTECTED] **/ @Override public UrlRewriterContainer getUrlRewriterContainer(final ServletRequest request){ Modified: branches/2.17/war/src/main/webapp/WEB-INF/urlrewrite.xml =================================================================== --- branches/2.17/war/src/main/webapp/WEB-INF/urlrewrite.xml 2008-04-18 08:31:32 UTC (rev 6484) +++ branches/2.17/war/src/main/webapp/WEB-INF/urlrewrite.xml 2008-04-18 10:24:08 UTC (rev 6485) @@ -23,7 +23,7 @@ Description: Purpose of the document follows. --> -<urlrewrite decode-using="null"> +<urlrewrite decode-using="null" use-query-string="true"> <!-- Global rewrites applicable to every skin (sitesearch and country!) --> <!-- tomcat puts in the name of the welcome page --> _______________________________________________ Kernel-commits mailing list [email protected] http://sesat.no/mailman/listinfo/kernel-commits
