attributes) {
- this.attributes = attributes;
- }
}
diff --git a/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java b/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java
index 9bd5ed8d..7ae0c865 100644
--- a/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java
+++ b/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java
@@ -27,6 +27,7 @@ import org.apache.commons.lang.StringEscapeUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
import javax.servlet.http.HttpServletRequest;
import java.io.PrintWriter;
@@ -37,12 +38,14 @@ import java.util.Map;
final public class NotificationService {
-
+ public static final String DEFAULT_WISE_URL = "http://localhost:8080/wisemapping";
@Autowired
private Mailer mailer;
- private String baseUrl;
+
private NotifierFilter notificationFilter;
+ private String baseUrl;
+
public NotificationService() {
this.notificationFilter = new NotifierFilter();
}
@@ -64,8 +67,8 @@ final public class NotificationService {
model.put("mindmap", mindmap);
model.put("message", "message");
model.put("ownerName", user.getFirstname());
- model.put("mapEditUrl", baseUrl + "/c/maps/" + mindmap.getId() + "/edit");
- model.put("baseUrl", baseUrl);
+ model.put("mapEditUrl", getBaseUrl() + "/c/maps/" + mindmap.getId() + "/edit");
+ model.put("baseUrl", getBaseUrl());
model.put("senderMail", user.getEmail());
model.put("message", message);
model.put("supportEmail", mailer.getSupportEmail());
@@ -83,7 +86,7 @@ final public class NotificationService {
final String messageBody =
"Someone, most likely you, requested a new password for your WiseMapping account.
\n" +
"Here is your new password: " + temporalPassword + "
\n" +
- "You can login clicking here. We strongly encourage you to change the password as soon as possible.
";
+ "You can login clicking here. We strongly encourage you to change the password as soon as possible.
";
sendTemplateMail(user, mailSubject, messageTitle, messageBody);
}
@@ -112,7 +115,7 @@ final public class NotificationService {
model.put("firstName", user.getFirstname());
model.put("messageTitle", messageTitle);
model.put("messageBody", messageBody);
- model.put("baseUrl", this.baseUrl);
+ model.put("baseUrl", getBaseUrl());
model.put("supportEmail", mailer.getSupportEmail());
mailer.sendEmail(mailer.getServerSenderEmail(), user.getEmail(), mailSubject, model, "baseLayout.vm");
@@ -127,10 +130,6 @@ final public class NotificationService {
}
- public void setBaseUrl(String baseUrl) {
- this.baseUrl = baseUrl;
- }
-
public void setMailer(Mailer mailer) {
this.mailer = mailer;
}
@@ -227,6 +226,17 @@ final public class NotificationService {
return retValue;
}
+ public String getBaseUrl() {
+ if ("${site.baseurl}".equals(baseUrl)) {
+ baseUrl = DEFAULT_WISE_URL;
+ System.err.println("Warning: site.baseurl has not being configured. Mail site references could be not properly sent. Using :" + baseUrl);
+ }
+ return baseUrl;
+ }
+
+ public void setBaseUrl(String baseUrl) {
+ this.baseUrl = baseUrl;
+ }
}
diff --git a/wise-webapp/src/main/resources/com/wisemapping/model/AccessAuditory.hbm.xml b/wise-webapp/src/main/resources/com/wisemapping/model/AccessAuditory.hbm.xml
index c9eb20da..8586119d 100755
--- a/wise-webapp/src/main/resources/com/wisemapping/model/AccessAuditory.hbm.xml
+++ b/wise-webapp/src/main/resources/com/wisemapping/model/AccessAuditory.hbm.xml
@@ -1,7 +1,7 @@
+ "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
diff --git a/wise-webapp/src/main/resources/com/wisemapping/model/Collaboration.hbm.xml b/wise-webapp/src/main/resources/com/wisemapping/model/Collaboration.hbm.xml
index a07f023f..51808281 100644
--- a/wise-webapp/src/main/resources/com/wisemapping/model/Collaboration.hbm.xml
+++ b/wise-webapp/src/main/resources/com/wisemapping/model/Collaboration.hbm.xml
@@ -1,7 +1,7 @@
+ "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
diff --git a/wise-webapp/src/main/resources/com/wisemapping/model/CollaborationProperties.hbm.xml b/wise-webapp/src/main/resources/com/wisemapping/model/CollaborationProperties.hbm.xml
index 905f9bf0..6e9908d6 100644
--- a/wise-webapp/src/main/resources/com/wisemapping/model/CollaborationProperties.hbm.xml
+++ b/wise-webapp/src/main/resources/com/wisemapping/model/CollaborationProperties.hbm.xml
@@ -1,7 +1,7 @@
+ "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
diff --git a/wise-webapp/src/main/resources/com/wisemapping/model/Collaborator.hbm.xml b/wise-webapp/src/main/resources/com/wisemapping/model/Collaborator.hbm.xml
index 4bc92e65..ef094032 100755
--- a/wise-webapp/src/main/resources/com/wisemapping/model/Collaborator.hbm.xml
+++ b/wise-webapp/src/main/resources/com/wisemapping/model/Collaborator.hbm.xml
@@ -1,7 +1,7 @@
+ "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
diff --git a/wise-webapp/src/main/resources/com/wisemapping/model/MindMapHistory.hbm.xml b/wise-webapp/src/main/resources/com/wisemapping/model/MindMapHistory.hbm.xml
index b265e130..e1320af4 100755
--- a/wise-webapp/src/main/resources/com/wisemapping/model/MindMapHistory.hbm.xml
+++ b/wise-webapp/src/main/resources/com/wisemapping/model/MindMapHistory.hbm.xml
@@ -1,7 +1,7 @@
+ "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
diff --git a/wise-webapp/src/main/resources/com/wisemapping/model/Mindmap.hbm.xml b/wise-webapp/src/main/resources/com/wisemapping/model/Mindmap.hbm.xml
index 45c43afa..823a0725 100644
--- a/wise-webapp/src/main/resources/com/wisemapping/model/Mindmap.hbm.xml
+++ b/wise-webapp/src/main/resources/com/wisemapping/model/Mindmap.hbm.xml
@@ -1,7 +1,7 @@
+ "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
diff --git a/wise-webapp/src/main/webapp/WEB-INF/app.properties b/wise-webapp/src/main/webapp/WEB-INF/app.properties
index 9d9189e3..f0aa2f30 100755
--- a/wise-webapp/src/main/webapp/WEB-INF/app.properties
+++ b/wise-webapp/src/main/webapp/WEB-INF/app.properties
@@ -80,8 +80,10 @@ google.recaptcha.publicKey = 6LeQ4tISAAAAALzCGKNgRv8UqsDx7Cb0vq4wbJBr
# etc.
admin.user = admin@wisemapping.org
-# Site URL. This url will be used during sharing emails and public views.
-site.baseurl = http://localhost:8080/wisemapping
+# Base URL where WiseMapping is deployed. By default, It will be automatically inferred.
+# If you are planning to put wisemapping behind an Apache using an Apache Proxy setup, you must enable this property.
+# site.baseurl = http:///example.com:8080/wisemapping
+
# Site Homepage URL. This will be used as URL for homepage location.
site.homepage = c/home
diff --git a/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties b/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties
index 5f160b6e..d8759994 100644
--- a/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties
+++ b/wise-webapp/src/main/webapp/WEB-INF/classes/log4j.properties
@@ -4,7 +4,8 @@ log4j.logger.com.wisemapping=WARN,stdout,R
log4j.logger.org.springframework=WARN,stdout,R
log4j.logger.org.codehaus.jackson=WARN,stdout,R
log4j.logger.org.hibernate=WARN,stdout,R
-log4j.logger.org.hibernate.SQL=true
+log4j.logger.org.hibernate.engine.StatefulPersistenceContext=ERROR,stdout,R
+#log4j.logger.org.hibernate.SQL=WARN,stdout,R
# Stdout logger �
diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-dao.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-dao.xml
index 1f690e87..c8017226 100644
--- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-dao.xml
+++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-dao.xml
@@ -7,9 +7,6 @@
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
-
-
-
diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml
index 92352c2d..a84c5a99 100644
--- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml
+++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml
@@ -11,8 +11,6 @@
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
-
-
@@ -72,9 +70,4 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml
index bbd9fcf5..8ebbd33f 100755
--- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml
+++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml
@@ -1,8 +1,11 @@
+ http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
+
+
diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml
index 215414ce..76584ef5 100644
--- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml
+++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml
@@ -14,9 +14,7 @@
-
+
@@ -38,18 +36,8 @@
-
-
-
-
-
-
-
+
+
@@ -110,10 +98,4 @@
-
-
-
-
diff --git a/wise-webapp/src/main/webapp/jsp/dialogFullTemplate.jsp b/wise-webapp/src/main/webapp/jsp/dialogFullTemplate.jsp
index 5abb179d..b7cc410d 100644
--- a/wise-webapp/src/main/webapp/jsp/dialogFullTemplate.jsp
+++ b/wise-webapp/src/main/webapp/jsp/dialogFullTemplate.jsp
@@ -16,7 +16,7 @@
-
+
diff --git a/wise-webapp/src/main/webapp/jsp/init.jsp b/wise-webapp/src/main/webapp/jsp/init.jsp
index 040b1cf2..91b72cbb 100644
--- a/wise-webapp/src/main/webapp/jsp/init.jsp
+++ b/wise-webapp/src/main/webapp/jsp/init.jsp
@@ -2,6 +2,3 @@
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-
-
-
diff --git a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp
index 08490c72..6220266e 100644
--- a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp
+++ b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp
@@ -11,7 +11,7 @@
<%--@elvariable id="mapXml" type="com.wisemapping.model.User"--%>
-
+
-