diff --git a/src/main/java/org/ecocean/servlet/IndividualAddComment.java b/src/main/java/org/ecocean/servlet/IndividualAddComment.java index 1bf474aef1..cbccbd6f47 100644 --- a/src/main/java/org/ecocean/servlet/IndividualAddComment.java +++ b/src/main/java/org/ecocean/servlet/IndividualAddComment.java @@ -34,6 +34,7 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) response.setContentType("text/html"); PrintWriter out = response.getWriter(); boolean locked = false; + String newComment = ""; myShepherd.beginDBTransaction(); if ((request.getParameter("individual") != null) && @@ -43,9 +44,10 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) "individual")); if (ServletUtilities.isUserAuthorizedForIndividual(commentMe, request)) { try { - commentMe.addComments("

" + request.getParameter("user") + " on " + + newComment = ("

" + request.getParameter("user") + " on " + (new java.util.Date()).toString() + "
" + request.getParameter("comments") + "

"); + commentMe.addComments(newComment); } catch (Exception le) { locked = true; le.printStackTrace(); @@ -57,6 +59,7 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) response.setStatus(HttpServletResponse.SC_OK); out.println( "Success: I have successfully added your comments."); + out.println(newComment); // out.println("

Return to " + request.getParameter("individual") + // "

\n"); diff --git a/src/main/webapp/individuals.jsp b/src/main/webapp/individuals.jsp index 543be4e317..3f3475cc96 100755 --- a/src/main/webapp/individuals.jsp +++ b/src/main/webapp/individuals.jsp @@ -2493,21 +2493,20 @@ if (sharky.getNames() != null) { if(isOwner){ %>

<%=researcherComments %>:

- -
+

<%=sharky.getComments().replaceAll("\n", "
")%>

<% if (CommonConfiguration.isCatalogEditable(context) && isOwner) { %>

-

+


- +

<% @@ -2520,6 +2519,41 @@ if (sharky.getNames() != null) {
+ <%-- End Comments --%>