Skip to content

Instantly share code, notes, and snippets.

@cfalzone
Last active December 15, 2015 00:59
Show Gist options
  • Save cfalzone/5177290 to your computer and use it in GitHub Desktop.
Save cfalzone/5177290 to your computer and use it in GitHub Desktop.
server.jsp
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.util.Calendar"%>
<%@page import="com.liferay.portal.util.ReleaseInfo"%>
<%@page import="com.liferay.portal.language.LanguageUtil"%>
<%@page import="com.dotmarketing.util.UtilMethods"%>
<%@page import="com.dotmarketing.util.Config"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Which Server?</title>
</head>
<body>
<%String serverId = Config.getStringProperty("DIST_INDEXATION_SERVER_ID");%>
<% if (UtilMethods.isSet(serverId)){ %>
<h3><%= LanguageUtil.get(pageContext, "Server") %>: <%=serverId%></h3>
<%} else {%>
<h3> Unable to determine Server ID </h3>
<%} %>
<p><b>Release Info:</b> <br />
<%= System.getProperty("dotcms_level_name")%>
<%= ReleaseInfo.getVersion() %><br/>
(<%= ReleaseInfo.getBuildNumber() %> / <%= ReleaseInfo.getBuildDateString() %>)
</p>
<% DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); %>
<p> <b>Current Date:</b> <%=dateFormat.format(Calendar.getInstance().getTime())%></p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment