mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
Config in XML, forgot to add connect servlet to web.xml
This commit is contained in:
@@ -24,23 +24,23 @@ import net.sourceforge.guacamole.GuacamoleException;
|
||||
|
||||
public class GuacamoleConfiguration extends Configuration {
|
||||
|
||||
private String hostname;
|
||||
private int port;
|
||||
private String guacd_hostname;
|
||||
private int guacd_port;
|
||||
|
||||
public GuacamoleConfiguration(ServletContext context) throws GuacamoleException {
|
||||
|
||||
super(context);
|
||||
|
||||
hostname = context.getInitParameter("hostname");
|
||||
port = readIntParameter("port", null);
|
||||
guacd_hostname = context.getInitParameter("guacd-hostname");
|
||||
guacd_port = readIntParameter("guacd-port", null);
|
||||
|
||||
}
|
||||
|
||||
public int getPort() {
|
||||
return port;
|
||||
public int getProxyPort() {
|
||||
return guacd_port;
|
||||
}
|
||||
|
||||
public String getHostname() {
|
||||
return hostname;
|
||||
public String getProxyHostname() {
|
||||
return guacd_hostname;
|
||||
}
|
||||
}
|
||||
|
@@ -96,8 +96,8 @@ public class GuacamoleSession {
|
||||
|
||||
client = new SessionClient(
|
||||
new GuacamoleClient (
|
||||
config.getHostname(),
|
||||
config.getPort()
|
||||
config.getProxyHostname(),
|
||||
config.getProxyPort()
|
||||
)
|
||||
);
|
||||
|
||||
|
@@ -1,2 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Context antiJARLocking="true" path=""/>
|
||||
<Context antiJARLocking="true" path="">
|
||||
|
||||
<!-- Hostname and port of guacamole proxy -->
|
||||
<Parameter name="guacd-hostname" value="localhost"/>
|
||||
<Parameter name="guacd-port" value="4822"/>
|
||||
|
||||
</Context>
|
||||
|
@@ -32,6 +32,16 @@
|
||||
|
||||
<!-- Servlets -->
|
||||
|
||||
<servlet>
|
||||
<description>Connect servlet.</description>
|
||||
<servlet-name>Connect</servlet-name>
|
||||
<servlet-class>net.sourceforge.guacamole.net.tunnel.Connect</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Connect</servlet-name>
|
||||
<url-pattern>/connect</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
<description>Outbound servlet.</description>
|
||||
<servlet-name>Outbound</servlet-name>
|
||||
|
Reference in New Issue
Block a user