Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

WL-2976 #3

Merged
merged 2 commits into from Oct 23, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -5,11 +5,11 @@
import javax.servlet.ServletContext;
import javax.servlet.ServletException;

/**
* Takes the properties from the web.xml config through the context, as opposed to being configured through sakai.propeties.
*/
public class ContextProperties extends SirLouieProperties {

/**
*
*/
private static final long serialVersionUID = 1L;

public ContextProperties(ServletContext context) throws ServletException {
Expand Down
Expand Up @@ -6,14 +6,10 @@
import org.sakaiproject.component.cover.ServerConfigurationService;

public class SakaiProperties extends SirLouieProperties {

/**
*
*/

private static final long serialVersionUID = 1L;
public final static String CONFIG_LOCATION = "sirlouie.properties";
public final static String WEBRESOURCE_URL = "sirlouie.webresourceURL";

/**
* This class allows the location of the sirlouie filter properties to be loaded from a
* file defined in the sakai.properties file.
Expand All @@ -24,11 +20,10 @@ public class SakaiProperties extends SirLouieProperties {
*/

public SakaiProperties(ServletContext context) throws ServletException {

super();
setProperty(WEBRESOURCE_URL, ServerConfigurationService.getString(WEBRESOURCE_URL));
}

public String getWebResourseURL() {
return getProperty(WEBRESOURCE_URL);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/WEB-INF/web.xml
Expand Up @@ -31,8 +31,8 @@
<!--
Properties taken from sakai.properties or from context
-->
<!--param-value>uk.ac.ox.oucs.sirlouie.properties.SakaiProperties</param-value-->
<param-value>uk.ac.ox.oucs.sirlouie.properties.ContextProperties</param-value>
<param-value>uk.ac.ox.oucs.sirlouie.properties.SakaiProperties</param-value>
<!--param-value>uk.ac.ox.oucs.sirlouie.properties.ContextProperties</param-value-->
</init-param>

<load-on-startup>1</load-on-startup>
Expand Down