added server port configuration for mod_jk and mod_proxy

This commit is contained in:
Sebastian Sdorra
2011-02-06 15:32:12 +01:00
parent 33a912c32f
commit b70879cb48
3 changed files with 60 additions and 1 deletions

View File

@@ -94,6 +94,17 @@ public class ScmConfiguration
return pluginUrl; return pluginUrl;
} }
/**
* Method description
*
*
* @return
*/
public int getPort()
{
return port;
}
/** /**
* Method description * Method description
* *
@@ -173,6 +184,17 @@ public class ScmConfiguration
this.pluginUrl = pluginUrl; this.pluginUrl = pluginUrl;
} }
/**
* Method description
*
*
* @param port
*/
public void setPort(int port)
{
this.port = port;
}
/** /**
* Method description * Method description
* *
@@ -201,6 +223,9 @@ public class ScmConfiguration
@XmlElement(name = "plugin-url") @XmlElement(name = "plugin-url")
private String pluginUrl = DEFAULT_PLUGINURL; private String pluginUrl = DEFAULT_PLUGINURL;
/** Field description */
private int port = -1;
/** Field description */ /** Field description */
private String servername = "localhost"; private String servername = "localhost";

View File

@@ -233,7 +233,7 @@ public class RepositoryResource extends AbstractResource<Repository>
StringBuilder url = new StringBuilder(request.getScheme()); StringBuilder url = new StringBuilder(request.getScheme());
url.append("://").append(configuration.getServername()); url.append("://").append(configuration.getServername());
url.append(":").append(request.getLocalPort()); url.append(":").append(getPort(request));
String ctxPath = request.getContextPath(); String ctxPath = request.getContextPath();
@@ -271,6 +271,35 @@ public class RepositoryResource extends AbstractResource<Repository>
//~--- get methods ---------------------------------------------------------- //~--- get methods ----------------------------------------------------------
/**
* Method description
*
*
* @param request
*
* @return
*/
private int getPort(HttpServletRequest request)
{
int port = 0;
if (configuration.isEnableSSL())
{
port = configuration.getSslPort();
}
else
{
port = configuration.getPort();
}
if (port <= 0)
{
port = request.getLocalPort();
}
return port;
}
/** /**
* Method description * Method description
* *

View File

@@ -98,6 +98,11 @@ Sonia.config.ScmConfigPanel = Ext.extend(Sonia.config.ConfigPanel,{
fieldLabel: 'Servername', fieldLabel: 'Servername',
name: 'servername', name: 'servername',
allowBlank: false allowBlank: false
},{
xtype: 'textfield',
fieldLabel: 'Serverport',
name: 'port',
allowBlank: false
},{ },{
xtype: 'textfield', xtype: 'textfield',
fieldLabel: 'Plugin repository', fieldLabel: 'Plugin repository',