Bug in Subsite behoben. In web.xml stand für den filter der falsche Eintag (inkl. ccm prefix, was nicht funktioniert). Subsitges funktionieren jetzt wieder.
git-svn-id: https://svn.libreccm.org/ccm/trunk@485 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
883cd31aea
commit
02b4cdb547
|
|
@ -55,10 +55,7 @@
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
<filter-name>subsite</filter-name>
|
<filter-name>subsite</filter-name>
|
||||||
<url-pattern>/ccm/*</url-pattern>
|
|
||||||
<!-- please check: with or w/o ccm?
|
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
-->
|
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
|
|
|
||||||
|
|
@ -58,10 +58,7 @@
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
<filter-name>subsite</filter-name>
|
<filter-name>subsite</filter-name>
|
||||||
<url-pattern>/ccm/*</url-pattern>
|
|
||||||
<!-- please check: with or w/o ccm?
|
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
-->
|
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
|
||||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
|
||||||
|
version="2.4">
|
||||||
</web-app>
|
</web-app>
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,7 @@
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
<filter-name>subsite</filter-name>
|
<filter-name>subsite</filter-name>
|
||||||
<url-pattern>/ccm/*</url-pattern>
|
|
||||||
<!-- please check: with or w/o ccm?
|
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
-->
|
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
|
|
|
||||||
|
|
@ -45,10 +45,6 @@ import com.arsdigita.xml.XML;
|
||||||
* @version $Id: Initializer.java 287 2005-02-22 00:29:02Z sskracic $
|
* @version $Id: Initializer.java 287 2005-02-22 00:29:02Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class Initializer extends CompoundInitializer {
|
public class Initializer extends CompoundInitializer {
|
||||||
public final static String versionId =
|
|
||||||
"$Id: Initializer.java 287 2005-02-22 00:29:02Z sskracic $" +
|
|
||||||
"$Author: sskracic $" +
|
|
||||||
"$DateTime: 2004/01/23 10:22:44 $";
|
|
||||||
|
|
||||||
public Initializer() {
|
public Initializer() {
|
||||||
final String url = RuntimeConfig.getConfig().getJDBCURL();
|
final String url = RuntimeConfig.getConfig().getJDBCURL();
|
||||||
|
|
@ -72,7 +68,7 @@ public class Initializer extends CompoundInitializer {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO - one the core initializers are ported this should be moved
|
// TODO - once the core initializers are ported this should be moved
|
||||||
// to be a DomainEvent instead of a LegacyInitEvent
|
// to be a DomainEvent instead of a LegacyInitEvent
|
||||||
public void init(LegacyInitEvent evt) {
|
public void init(LegacyInitEvent evt) {
|
||||||
super.init(evt);
|
super.init(evt);
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,6 @@ import org.apache.log4j.Logger;
|
||||||
* @version $Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $
|
* @version $Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class Loader extends PackageLoader {
|
public class Loader extends PackageLoader {
|
||||||
public final static String versionId =
|
|
||||||
"$Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $" +
|
|
||||||
"$Author: sskracic $" +
|
|
||||||
"$DateTime: 2004/01/23 10:22:44 $";
|
|
||||||
|
|
||||||
private static final Logger s_log = Logger.getLogger(Loader.class);
|
private static final Logger s_log = Logger.getLogger(Loader.class);
|
||||||
|
|
||||||
|
|
@ -54,7 +50,7 @@ public class Loader extends PackageLoader {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This creates an initializes the subsite application
|
* This creates and initializes the subsite application
|
||||||
*/
|
*/
|
||||||
private void createApplication() {
|
private void createApplication() {
|
||||||
ApplicationType type = ApplicationType
|
ApplicationType type = ApplicationType
|
||||||
|
|
|
||||||
|
|
@ -18,19 +18,24 @@
|
||||||
|
|
||||||
package com.arsdigita.london.subsite;
|
package com.arsdigita.london.subsite;
|
||||||
|
|
||||||
import com.arsdigita.util.Assert;
|
|
||||||
import com.arsdigita.kernel.ACSObject;
|
|
||||||
import com.arsdigita.web.Application;
|
|
||||||
import com.arsdigita.categorization.Category;
|
import com.arsdigita.categorization.Category;
|
||||||
|
import com.arsdigita.cms.TemplateContext;
|
||||||
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
|
import com.arsdigita.domain.DomainObjectFactory;
|
||||||
|
import com.arsdigita.kernel.ACSObject;
|
||||||
import com.arsdigita.persistence.DataObject;
|
import com.arsdigita.persistence.DataObject;
|
||||||
import com.arsdigita.persistence.DataCollection;
|
import com.arsdigita.persistence.DataCollection;
|
||||||
import com.arsdigita.persistence.OID;
|
import com.arsdigita.persistence.OID;
|
||||||
import com.arsdigita.persistence.SessionManager;
|
import com.arsdigita.persistence.SessionManager;
|
||||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
import com.arsdigita.util.Assert;
|
||||||
import com.arsdigita.domain.DomainObjectFactory;
|
import com.arsdigita.web.Application;
|
||||||
import com.arsdigita.cms.TemplateContext;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a single subsite (as created by the admin interface)
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class Site extends ACSObject {
|
public class Site extends ACSObject {
|
||||||
|
|
||||||
public static final String BASE_DATA_OBJECT_TYPE =
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
|
|
@ -43,10 +48,17 @@ public class Site extends ACSObject {
|
||||||
public static final String FRONT_PAGE = "frontPage";
|
public static final String FRONT_PAGE = "frontPage";
|
||||||
public static final String TEMPLATE_CONTEXT = "templateContext";
|
public static final String TEMPLATE_CONTEXT = "templateContext";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
public Site() {
|
public Site() {
|
||||||
this(BASE_DATA_OBJECT_TYPE);
|
this(BASE_DATA_OBJECT_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
public Site(String type) {
|
public Site(String type) {
|
||||||
super(type);
|
super(type);
|
||||||
}
|
}
|
||||||
|
|
@ -71,6 +83,15 @@ public class Site extends ACSObject {
|
||||||
return site;
|
return site;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param title
|
||||||
|
* @param description
|
||||||
|
* @param hostname
|
||||||
|
* @param styleDir
|
||||||
|
* @param root
|
||||||
|
* @param frontPage
|
||||||
|
*/
|
||||||
protected void setup(String title,
|
protected void setup(String title,
|
||||||
String description,
|
String description,
|
||||||
String hostname,
|
String hostname,
|
||||||
|
|
@ -119,6 +140,12 @@ public class Site extends ACSObject {
|
||||||
return (Site)DomainObjectFactory.newInstance(obj);
|
return (Site)DomainObjectFactory.newInstance(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param hostname
|
||||||
|
* @return
|
||||||
|
* @throws DataObjectNotFoundException
|
||||||
|
*/
|
||||||
public static Site findByHostname(String hostname)
|
public static Site findByHostname(String hostname)
|
||||||
throws DataObjectNotFoundException {
|
throws DataObjectNotFoundException {
|
||||||
DataCollection sites = SessionManager.getSession()
|
DataCollection sites = SessionManager.getSession()
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,9 @@ import com.arsdigita.dispatcher.DispatcherHelper;
|
||||||
import com.arsdigita.london.subsite.Site;
|
import com.arsdigita.london.subsite.Site;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* <p>The entry point into all the global state that CCM Subsite code expects to
|
* <p>The entry point into all the global state that CCM Subsite code expects to
|
||||||
* have available to it when running, e.g. the current content section,
|
* have available to it when running, e.g. the current content section,
|
||||||
* current item
|
* current item </p>
|
||||||
*
|
*
|
||||||
* <p>This is a session object that provides an environment in which
|
* <p>This is a session object that provides an environment in which
|
||||||
* code can execute. The SubsiteContext contains all session-specific
|
* code can execute. The SubsiteContext contains all session-specific
|
||||||
|
|
@ -40,23 +39,28 @@ import com.arsdigita.london.subsite.Site;
|
||||||
* null explicitly, then use the hasContentItem and hasContentSection
|
* null explicitly, then use the hasContentItem and hasContentSection
|
||||||
* methods first.
|
* methods first.
|
||||||
*
|
*
|
||||||
* @author Daniel Berrange
|
|
||||||
* @see com.arsdigita.kernel.KernelContext
|
* @see com.arsdigita.kernel.KernelContext
|
||||||
* @see com.arsdigita.cms.Subsite
|
* @see com.arsdigita.cms.Subsite
|
||||||
|
*
|
||||||
|
* @author Daniel Berrange
|
||||||
|
* @version $Id: SubsiteContext.java 755 2005-09-02 13:42:47Z sskracic $
|
||||||
*/
|
*/
|
||||||
public final class SubsiteContext {
|
public final class SubsiteContext {
|
||||||
public static final String versionId =
|
|
||||||
"$Id: SubsiteContext.java 755 2005-09-02 13:42:47Z sskracic $" +
|
|
||||||
"$Author: sskracic $" +
|
|
||||||
"$DateTime: 2004/01/27 16:01:55 $";
|
|
||||||
|
|
||||||
private static final Logger s_log = Logger.getLogger(SubsiteContext.class);
|
private static final Logger s_log = Logger.getLogger(SubsiteContext.class);
|
||||||
|
|
||||||
public static final String SITE_REQUEST_ATTRIBUTE
|
public static final String SITE_REQUEST_ATTRIBUTE = Site.class.getName();
|
||||||
= Site.class.getName();
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
SubsiteContext() {}
|
SubsiteContext() {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public final String getDebugInfo() {
|
public final String getDebugInfo() {
|
||||||
String info = "Current state of " + this + ":\n" +
|
String info = "Current state of " + this + ":\n" +
|
||||||
" getSite() -> " + getSite() + "\n";
|
" getSite() -> " + getSite() + "\n";
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,30 @@ import com.arsdigita.london.navigation.NavigationContext;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Package's main worker class, SubsiteFilter intercepts each incomming request
|
||||||
|
* and checks if it matches a configured subsite address (name).
|
||||||
|
*
|
||||||
|
* SubsiteFilter class uses the standard servlet filter mechanism (servlet
|
||||||
|
* specification 2.3 and beyond) so the servlet container ensures its
|
||||||
|
* invocation.
|
||||||
|
*
|
||||||
|
* Usage: SubsiteFilter has to be declared in the web.xml application configuration
|
||||||
|
* file.
|
||||||
|
*/
|
||||||
public class SubsiteFilter extends BaseFilter {
|
public class SubsiteFilter extends BaseFilter {
|
||||||
|
|
||||||
private static final Logger s_log = Logger.getLogger(SubsiteFilter.class);
|
private static final Logger s_log = Logger.getLogger(SubsiteFilter.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks an incomming request if its hostname matches an existing subsite.
|
||||||
|
*
|
||||||
|
* @param sreq
|
||||||
|
* @param sresp
|
||||||
|
* @param chain
|
||||||
|
* @throws IOException
|
||||||
|
* @throws ServletException
|
||||||
|
*/
|
||||||
protected void doService(HttpServletRequest sreq,
|
protected void doService(HttpServletRequest sreq,
|
||||||
HttpServletResponse sresp,
|
HttpServletResponse sresp,
|
||||||
FilterChain chain)
|
FilterChain chain)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
|
||||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
|
||||||
|
version="2.4">
|
||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<filter-name>subsite</filter-name>
|
<filter-name>subsite</filter-name>
|
||||||
|
|
@ -9,10 +11,7 @@
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
<filter-name>subsite</filter-name>
|
<filter-name>subsite</filter-name>
|
||||||
<url-pattern>/ccm/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
<!-- please check: with or w/o ccm?
|
|
||||||
<url-pattern>/*</url-pattern>
|
|
||||||
-->
|
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
||||||
<!-- module ccm-ldn-subsite - servlet declarations BEGIN -->
|
<!-- module ccm-ldn-subsite - servlet declarations BEGIN -->
|
||||||
|
|
|
||||||
|
|
@ -56,10 +56,7 @@
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
<filter-name>subsite</filter-name>
|
<filter-name>subsite</filter-name>
|
||||||
<url-pattern>/ccm/*</url-pattern>
|
|
||||||
<!-- please check: with or w/o ccm?
|
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
-->
|
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,7 @@
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
<filter-name>subsite</filter-name>
|
<filter-name>subsite</filter-name>
|
||||||
<url-pattern>/ccm/*</url-pattern>
|
|
||||||
<!-- please check: with or w/o ccm?
|
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
-->
|
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,7 @@
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
<filter-name>subsite</filter-name>
|
<filter-name>subsite</filter-name>
|
||||||
<url-pattern>/ccm/*</url-pattern>
|
|
||||||
<!-- please check: with or w/o ccm?
|
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
-->
|
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,7 @@
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
<filter-name>subsite</filter-name>
|
<filter-name>subsite</filter-name>
|
||||||
<url-pattern>/ccm/*</url-pattern>
|
|
||||||
<!-- please check: with or w/o ccm?
|
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
-->
|
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
|
|
|
||||||
|
|
@ -58,10 +58,7 @@
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
<filter-name>subsite</filter-name>
|
<filter-name>subsite</filter-name>
|
||||||
<url-pattern>/ccm/*</url-pattern>
|
|
||||||
<!-- please check: with or w/o ccm?
|
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
-->
|
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue