I have a plugin that needs to get and set 2 properties in JiveGlobals. I have created public getters and setters in this plugin for the purpose (they call JiveGlobals.setProperty(String, String) and JiveGlobals.getProperty(String).
In the JSP I’ve created for the admin console, I have an HTML form to submit new values for these. The file starts with this code:
<%@ page import="org.jivesoftware.util.ParamUtils,
com.gestalt.nettoolkit.nac.producer.listener.XmppPlugin,
org.jivesoftware.openfire.XMPPServer,
org.jivesoftware.openfire.container.PluginManager,
org.jivesoftware.openfire.container.Plugin" %>
<%
boolean save = request.getParameter(“save”) != null;
String hostname = “test”;
String port = “test”;
XmppPlugin plugin = (XmppPlugin) (XMPPServer.getInstance().getPluginManager().getPlugin(“listener-plugin”));
if (save) {
hostname = (String)ParamUtils.getParameter(request, “hostname”);
port = (String)ParamUtils.getParameter(request, “port”);
// plugin.setHostname(hostname);
// plugin.setPort(port);
} else {
hostname = plugin.getHostname();
port = plugin.getPort();
}
%>
SOME HTML
The problem is, this code serves up a blank page. If I comment out the code within the else block, however, it displays fine.
Any thoughts?