--- src/main/java/org/apache/wiki/WikiEngine.java.orig 2016-12-11 22:30:03.803830500 +0100 +++ src/main/java/org/apache/wiki/WikiEngine.java 2016-12-11 22:37:43.901123500 +0100 @@ -198,9 +198,6 @@ /** If true, uses UTF8 encoding for all data */ private boolean m_useUTF8 = true; - /** Stores the base URL. */ - private String m_baseURL; - /** Store the file path to the basic URL. When we're not running as a servlet, it defaults to the user's current directory. */ private String m_rootPath = System.getProperty("user.dir"); @@ -533,11 +530,6 @@ m_saveUserInfo ); m_useUTF8 = "UTF-8".equals( TextUtil.getStringProperty( props, PROP_ENCODING, "ISO-8859-1" ) ); - m_baseURL = TextUtil.getStringProperty(props, PROP_BASEURL, ""); - if (!m_baseURL.endsWith("/")) - { - m_baseURL = m_baseURL + "/"; - } m_beautifyTitle = TextUtil.getBooleanProperty( props, PROP_BEAUTIFYTITLE, @@ -795,9 +787,12 @@ public String getBaseURL() { - return m_baseURL; + String contextPath = m_servletContext.getContextPath(); + + return contextPath; } + /** * Returns the moment when this engine was started. *