Commit 4d43f1ec authored by Bill Lynch's avatar Bill Lynch Committed by bill

Moved to .jspf's (JSP fragments). These are automatically excluded from JSPC tasks


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@69 b35dd754-fafc-0310-a699-88a17e54d16e
parent 5a9c4f55
<%@ page import="org.jivesoftware.messenger.Session,
org.jivesoftware.messenger.Presence"%>
<%--
- $RCSfile$
- $Revision$
- $Date$
--%>
<%--
- This page is meant to be included in other pages. It assumes 2 variables:
- * 'sess', a org.jivesoftware.messenger.Session object
- * 'count', an int representing the row number we're on.
- * 'current', a boolean which indicates the current row the user is looking (pass in
- false if there is no current row.
- * 'linkURL', a String representing the JSP page to link to
--%>
<% if (current) { %>
<tr class="jive-current">
<% } else { %>
<tr class="jive-<%= (((count % 2) == 0) ? "even" : "odd") %>">
<% } %>
<td width="1%" nowrap><%= count %></td>
<td width="10%" nowrap>
<% String name = sess.getAddress().getName(); %>
<a href="session-details.jsp?jid=<%= sess.getAddress() %>" title="Click for more info..."
><%= ((name != null && !"".equals(name)) ? name : "<i>Anonymous</i>") %></a>
<% if (sess.getConnection().isSecure()) { %>
<img src="images/lock.gif" width="9" height="12" border="0"
title="User is connected via SSL" hspace="2">
<% } %>
</td>
<td width="15%" nowrap>
<%= sess.getAddress().getResource() %>
</td>
<td width="25%">
<% int _status = sess.getStatus();
if (_status == Session.STATUS_CLOSED) {
%>
Closed
<% } else if (_status == Session.STATUS_CONNECTED) { %>
Connected
<% } else if (_status == Session.STATUS_STREAMING) { %>
Streaming
<% } else if (_status == Session.STATUS_AUTHENTICATED) { %>
Authenticated
<% } else { %>
Unknown
<% } %>
</td>
<% int _show = sess.getPresence().getShow();
String _stat = sess.getPresence().getStatus();
if (_show == Presence.SHOW_AWAY) {
%>
<td width="1%"
><img src="images/status-away.gif" width="14" height="14" border="0" title="Away"
></td>
<td width="46%">
<% if (_stat != null) { %>
<%= _stat %>
<% } else { %>
Away
<% } %>
</td>
<% } else if (_show == Presence.SHOW_CHAT) { %>
<td width="1%"
><img src="images/status-chat.gif" width="14" height="14" border="0" title="Available to Chat"
></td>
<td width="46%">
Available to Chat
</td>
<% } else if (_show == Presence.SHOW_DND) { %>
<td width="1%"
><img src="images/status-dnd.gif" width="14" height="14" border="0" title="Do Not Disturb"
></td>
<td width="46%">
<% if (_stat != null) { %>
<%= sess.getPresence().getStatus() %>
<% } else { %>
Do Not Disturb
<% } %>
</td>
<% } else if (_show == Presence.SHOW_INVISIBLE) { %>
<td colspan="2" width="47%">
<% if (_stat != null) { %>
<%= sess.getPresence().getStatus() %>
<% } else { %>
Invisible
<% } %>
</td>
<% } else if (_show == Presence.SHOW_NONE) { %>
<td width="1%"
><img src="images/status-online.gif" width="14" height="14" border="0" title="Online"
></td>
<td width="46%">
Online
</td>
<% } else if (_show == Presence.SHOW_XA) { %>
<td width="1%"
><img src="images/status-xaway.gif" width="14" height="14" border="0" title="Extended Away"
></td>
<td width="46%">
<% if (_stat != null) { %>
<%= sess.getPresence().getStatus() %>
<% } else { %>
Extended Away
<% } %>
</td>
<% } else { %>
<td colspan="2" width="46%">
Unknown/Not Recognized
</td>
<% } %>
<td width="1%" nowrap>
<%= sess.getConnection().getInetAddress().getHostAddress() %>
</td>
<td width="1%" nowrap align="center">
<a href="session-summary.jsp?jid=<%= sess.getAddress() %>&close=true"
title="Click to kill session..."
onclick="return confirm('Are you sure you want to close this connection?');"
><img src="images/button_delete.gif" width="17" height="17" border="0"></a>
</td>
</tr>
\ No newline at end of file
<%@ taglib uri="core" prefix="c" %>
<%@ taglib uri="fmt" prefix="fmt" %>
<%--
- $RCSfile$
- $Revision$
- $Date$
--%>
<%@ page import="java.lang.reflect.Method,
java.io.File" %>
<%-- note, the loadClass method is defined in setup-global.jsp --%>
<% // Check the user's environment for minimum requirements.
boolean jdk13Installed = false;
boolean servlet22Installed = false;
boolean jsp11Installed = false;
boolean jiveJarsInstalled = false;
boolean jiveHomeExists = false;
File jiveHome = null;
// Check for JDK 1.3
try {
loadClass("java.util.concurrent.ConcurrentHashMap");
jdk13Installed = true;
}
catch (ClassNotFoundException cnfe) {}
// Check for Servlet 2.3:
try {
Class c = loadClass("javax.servlet.http.HttpSession");
Method m = c.getMethod("getAttribute",new Class[]{String.class});
servlet22Installed = true;
}
catch (ClassNotFoundException cnfe) {}
// Check for JSP 1.1:
try {
loadClass("javax.servlet.jsp.tagext.Tag");
jsp11Installed = true;
}
catch (ClassNotFoundException cnfe) {}
// Check that the Messenger jar are installed:
try {
loadClass("org.jivesoftware.messenger.XMPPServer");
jiveJarsInstalled = true;
}
catch (ClassNotFoundException cnfe) {}
// Try to determine what the jiveHome directory is:
try {
Class jiveGlobalsClass = loadClass("org.jivesoftware.messenger.JiveGlobals");
Method getJiveHomeMethod = jiveGlobalsClass.getMethod("getJiveHome", null);
String jiveHomeProp = (String)getJiveHomeMethod.invoke(jiveGlobalsClass, null);
if (jiveHomeProp != null) {
jiveHome = new File(jiveHomeProp);
if (jiveHome.exists()) {
jiveHomeExists = true;
}
}
}
catch (Exception e) {
e.printStackTrace();
}
// If there were no errors, redirect to the main setup page
if (!jdk13Installed || !servlet22Installed || !jsp11Installed || !jiveJarsInstalled
|| !jiveHomeExists)
{
%>
<html>
<head>
<title><fmt:message key="title" bundle="${lang}" /> Setup</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<p class="jive-setup-page-header">
<fmt:message key="title" bundle="${lang}" /> Setup
</p>
<p class="jive-setup-error-text">
Error: Can not proceed with <fmt:message key="title" bundle="${lang}" /> setup.
</p>
<p>
Your current installation fails to meet minimum <fmt:message key="title" bundle="${lang}" /> requirements - please see
the checklist below:
</p>
<ul>
<table cellpadding="3" cellspacing="2" border="0">
<% if (jdk13Installed) { %>
<tr>
<td><img src="images/check.gif" width="13" height="13" border="0"></td>
<td>
At least JDK 1.5
</td>
</tr>
<% } else { %>
<tr>
<td><img src="images/x.gif" width="13" height="13" border="0"></td>
<td>
<span class="jive-setup-error-text">
At least JDK 1.5
</span>
</td>
</tr>
<% }
if (servlet22Installed) {
%>
<tr>
<td><img src="images/check.gif" width="13" height="13" border="0"></td>
<td>
Servlet 2.2 Support
</td>
</tr>
<% } else { %>
<tr>
<td><img src="images/x.gif" width="13" height="13" border="0"></td>
<td>
<span class="jive-setup-error-text">
Servlet 2.2 Support
</span>
</td>
</tr>
<% }
if (jsp11Installed) {
%>
<tr>
<td><img src="images/check.gif" width="13" height="13" border="0"></td>
<td>
JSP 1.1 Support
</td>
</tr>
<% } else { %>
<tr>
<td><img src="images/x.gif" width="13" height="13" border="0"></td>
<td>
<span class="jive-setup-error-text">
JSP 1.1 Support
</span>
</td>
</tr>
<% }
if (jiveJarsInstalled) {
%>
<tr>
<td><img src="images/check.gif" width="13" height="13" border="0"></td>
<td>
<fmt:message key="title" bundle="${lang}" /> Classes
</td>
</tr>
<% } else { %>
<tr>
<td><img src="images/x.gif" width="13" height="13" border="0"></td>
<td>
<span class="jive-setup-error-text">
<fmt:message key="title" bundle="${lang}" /> Classes
</span>
</td>
</tr>
<% }
if (jiveHomeExists) {
%>
<tr>
<td><img src="images/x.gif" width="13" height="13" border="0"></td>
<td>
<span class="jive-setup-error-text">
Jive Home Directory (<%= jiveHome.toString() %>)
</span>
</td>
</tr>
<% } else { %>
<tr>
<td><img src="images/x.gif" width="13" height="13" border="0"></td>
<td>
<span class="jive-setup-error-text">
Jive Home Directory - Not Set
</span>
</td>
</tr>
<% } %>
</table>
</ul>
<p>
Please read the installation documentation and try setting up your environment again. After making
changes, restart your appserver and load this page again.
</p>
</body>
</html>
<% // return so we stop showing the page:
return;
}
%>
\ No newline at end of file
<%@ taglib uri="core" prefix="c"%>
<%@ taglib uri="fmt" prefix="fmt" %>
<%--
- $RCSfile$
- $Revision$
- $Date$
--%>
<%@ page import="org.jivesoftware.util.*" %>
<html>
<head>
<title><fmt:message key="title" bundle="${lang}" /> Setup</title>
<link rel="stylesheet" type="text/css" href="setup-style.css">
</head>
<body>
<span class="jive-setup-header">
<table cellpadding="8" cellspacing="0" border="0" width="100%">
<tr>
<td width="99%">
<fmt:message key="title" bundle="${lang}" /> Setup
</td>
<td width="1%" nowrap>
<font size="-2" face="arial,helvetica,sans-serif" color="#ffffff">
<b>
Jive Software
</b>
</font>
</td>
</tr>
</table>
</span>
<table bgcolor="#bbbbbb" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td><img src="images/blank.gif" width="1" height="1" border="0"></td></tr>
</table>
<table bgcolor="#dddddd" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td><img src="images/blank.gif" width="1" height="1" border="0"></td></tr>
</table>
<table bgcolor="#eeeeee" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td><img src="images/blank.gif" width="1" height="1" border="0"></td></tr>
</table>
<br>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="top">
<% if (showSidebar) { %>
<td width="1%" nowrap>
<jsp:include page="setup-sidebar.jsp" flush="true" />
</td>
<td width="1%" nowrap><img src="images/blank.gif" width="15" height="1" border="0"></td>
<% } %>
<td width="98%">
<%--
- $RCSfile$
- $Revision$
- $Date$
--%>
<script language="JavaScript" type="text/javascript">
function closeWin() {
if (parent) {
parent.window.close();
}
else {
window.close();
}
}
</script>
<div class="jive-admin-page-title">
<table cellpadding="2" cellspacing="0" border="0" width="100%">
<tr>
<td>
<%= title %>
</td>
<td align="right">
<span class="jive-breadcrumbs">
<a href="" onclick="closeWin(); return false;">Close Window</a>
</span>
</td>
</tr>
</table>
</div>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment