Commit 26124807 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Added fields for s2s and component ports.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1409 b35dd754-fafc-0310-a699-88a17e54d16e
parent e7de4b21
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
int embeddedPort = ParamUtils.getIntParameter(request,"embeddedPort",-1); int embeddedPort = ParamUtils.getIntParameter(request,"embeddedPort",-1);
int embeddedSecurePort = ParamUtils.getIntParameter(request,"embeddedSecurePort",-1); int embeddedSecurePort = ParamUtils.getIntParameter(request,"embeddedSecurePort",-1);
boolean sslEnabled = ParamUtils.getBooleanParameter(request,"sslEnabled"); boolean sslEnabled = ParamUtils.getBooleanParameter(request,"sslEnabled");
int componentPort = ParamUtils.getIntParameter(request,"componentPort",-1);
int serverPort = ParamUtils.getIntParameter(request,"serverPort",-1);
boolean save = request.getParameter("save") != null; boolean save = request.getParameter("save") != null;
boolean defaults = request.getParameter("defaults") != null; boolean defaults = request.getParameter("defaults") != null;
boolean cancel = request.getParameter("cancel") != null; boolean cancel = request.getParameter("cancel") != null;
...@@ -49,8 +51,10 @@ ...@@ -49,8 +51,10 @@
if (defaults) { if (defaults) {
serverName = InetAddress.getLocalHost().getHostName(); serverName = InetAddress.getLocalHost().getHostName();
port = 5222; port = SocketAcceptThread.DEFAULT_PORT;
sslPort = 5223; sslPort = SSLSocketAcceptThread.DEFAULT_PORT;
componentPort = SocketAcceptThread.DEFAULT_COMPONENT_PORT;
serverPort = SocketAcceptThread.DEFAULT_SERVER_PORT;
embeddedPort = 9090; embeddedPort = 9090;
embeddedSecurePort = 9091; embeddedSecurePort = 9091;
sslEnabled = true; sslEnabled = true;
...@@ -69,6 +73,12 @@ ...@@ -69,6 +73,12 @@
if (sslPort < 1 && sslEnabled) { if (sslPort < 1 && sslEnabled) {
errors.put("sslPort",""); errors.put("sslPort","");
} }
if (componentPort < 1) {
errors.put("componentPort","");
}
if (serverPort < 1) {
errors.put("serverPort","");
}
if (embeddedPort < 1) { if (embeddedPort < 1) {
errors.put("embeddedPort",""); errors.put("embeddedPort","");
} }
...@@ -90,6 +100,8 @@ ...@@ -90,6 +100,8 @@
JiveGlobals.setProperty("xmpp.socket.plain.port", String.valueOf(port)); JiveGlobals.setProperty("xmpp.socket.plain.port", String.valueOf(port));
JiveGlobals.setProperty("xmpp.socket.ssl.active", String.valueOf(sslEnabled)); JiveGlobals.setProperty("xmpp.socket.ssl.active", String.valueOf(sslEnabled));
JiveGlobals.setProperty("xmpp.socket.ssl.port", String.valueOf(sslPort)); JiveGlobals.setProperty("xmpp.socket.ssl.port", String.valueOf(sslPort));
JiveGlobals.setProperty("xmpp.component.socket.port", String.valueOf(componentPort));
JiveGlobals.setProperty("xmpp.server.socket.port", String.valueOf(serverPort));
JiveGlobals.setXMLProperty("adminConsole.port", String.valueOf(embeddedPort)); JiveGlobals.setXMLProperty("adminConsole.port", String.valueOf(embeddedPort));
JiveGlobals.setXMLProperty("adminConsole.securePort", String.valueOf(embeddedSecurePort)); JiveGlobals.setXMLProperty("adminConsole.securePort", String.valueOf(embeddedSecurePort));
response.sendRedirect("server-props.jsp?success=true"); response.sendRedirect("server-props.jsp?success=true");
...@@ -101,6 +113,8 @@ ...@@ -101,6 +113,8 @@
sslEnabled = "true".equals(JiveGlobals.getProperty("xmpp.socket.ssl.active")); sslEnabled = "true".equals(JiveGlobals.getProperty("xmpp.socket.ssl.active"));
try { port = Integer.parseInt(JiveGlobals.getProperty("xmpp.socket.plain.port", String.valueOf(SocketAcceptThread.DEFAULT_PORT))); } catch (Exception ignored) {} try { port = Integer.parseInt(JiveGlobals.getProperty("xmpp.socket.plain.port", String.valueOf(SocketAcceptThread.DEFAULT_PORT))); } catch (Exception ignored) {}
try { sslPort = Integer.parseInt(JiveGlobals.getProperty("xmpp.socket.ssl.port", String.valueOf(SSLSocketAcceptThread.DEFAULT_PORT))); } catch (Exception ignored) {} try { sslPort = Integer.parseInt(JiveGlobals.getProperty("xmpp.socket.ssl.port", String.valueOf(SSLSocketAcceptThread.DEFAULT_PORT))); } catch (Exception ignored) {}
try { componentPort = Integer.parseInt(JiveGlobals.getProperty("xmpp.component.socket.port", String.valueOf(SocketAcceptThread.DEFAULT_COMPONENT_PORT))); } catch (Exception ignored) {}
try { serverPort = Integer.parseInt(JiveGlobals.getProperty("xmpp.server.socket.port", String.valueOf(SocketAcceptThread.DEFAULT_SERVER_PORT))); } catch (Exception ignored) {}
try { embeddedPort = Integer.parseInt(JiveGlobals.getXMLProperty("adminConsole.port")); } catch (Exception ignored) {} try { embeddedPort = Integer.parseInt(JiveGlobals.getXMLProperty("adminConsole.port")); } catch (Exception ignored) {}
try { embeddedSecurePort = Integer.parseInt(JiveGlobals.getXMLProperty("adminConsole.securePort")); } catch (Exception ignored) {} try { embeddedSecurePort = Integer.parseInt(JiveGlobals.getXMLProperty("adminConsole.securePort")); } catch (Exception ignored) {}
} }
...@@ -171,6 +185,40 @@ ...@@ -171,6 +185,40 @@
<% } %> <% } %>
</td> </td>
</tr> </tr>
<tr>
<td class="c1">
<fmt:message key="server.props.server_port" />
</td>
<td class="c2">
<input type="text" name="serverPort" value="<%= (serverPort > 0 ? String.valueOf(serverPort) : "") %>"
size="5" maxlength="5">
<% if (errors.containsKey("serverPort")) { %>
<br>
<span class="jive-error-text">
<fmt:message key="server.props.valid_port" />
<a href="#" onclick="document.editform.serverPort.value='<%=SocketAcceptThread.DEFAULT_SERVER_PORT%>';"
><fmt:message key="server.props.valid_port1" /></a>.
</span>
<% } %>
</td>
</tr>
<tr>
<td class="c1">
<fmt:message key="server.props.component_port" />
</td>
<td class="c2">
<input type="text" name="componentPort" value="<%= (componentPort > 0 ? String.valueOf(componentPort) : "") %>"
size="5" maxlength="5">
<% if (errors.containsKey("componentPort")) { %>
<br>
<span class="jive-error-text">
<fmt:message key="server.props.valid_port" />
<a href="#" onclick="document.editform.componentPort.value='<%=SocketAcceptThread.DEFAULT_COMPONENT_PORT%>';"
><fmt:message key="server.props.valid_port1" /></a>.
</span>
<% } %>
</td>
</tr>
<tr> <tr>
<td class="c1"> <td class="c1">
<fmt:message key="server.props.port" /> <fmt:message key="server.props.port" />
...@@ -182,7 +230,7 @@ ...@@ -182,7 +230,7 @@
<br> <br>
<span class="jive-error-text"> <span class="jive-error-text">
<fmt:message key="server.props.valid_port" /> <fmt:message key="server.props.valid_port" />
<a href="#" onclick="document.editform.port.value='5222';" <a href="#" onclick="document.editform.port.value='<%=SocketAcceptThread.DEFAULT_PORT%>';"
><fmt:message key="server.props.valid_port1" /></a>. ><fmt:message key="server.props.valid_port1" /></a>.
</span> </span>
<% } else if (errors.containsKey("portsEqual")) { %> <% } else if (errors.containsKey("portsEqual")) { %>
...@@ -229,7 +277,7 @@ ...@@ -229,7 +277,7 @@
<br> <br>
<span class="jive-error-text"> <span class="jive-error-text">
<fmt:message key="server.props.ssl_valid" /> <fmt:message key="server.props.ssl_valid" />
<a href="#" onclick="document.editform.sslPort.value='5223';" <a href="#" onclick="document.editform.sslPort.value='<%=SSLSocketAcceptThread.DEFAULT_PORT%>';"
><fmt:message key="server.props.ssl_valid1" /></a>. ><fmt:message key="server.props.ssl_valid1" /></a>.
</span> </span>
<% } %> <% } %>
......
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