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 {
|
public class GuacamoleConfiguration extends Configuration {
|
||||||
|
|
||||||
private String hostname;
|
private String guacd_hostname;
|
||||||
private int port;
|
private int guacd_port;
|
||||||
|
|
||||||
public GuacamoleConfiguration(ServletContext context) throws GuacamoleException {
|
public GuacamoleConfiguration(ServletContext context) throws GuacamoleException {
|
||||||
|
|
||||||
super(context);
|
super(context);
|
||||||
|
|
||||||
hostname = context.getInitParameter("hostname");
|
guacd_hostname = context.getInitParameter("guacd-hostname");
|
||||||
port = readIntParameter("port", null);
|
guacd_port = readIntParameter("guacd-port", null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPort() {
|
public int getProxyPort() {
|
||||||
return port;
|
return guacd_port;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getHostname() {
|
public String getProxyHostname() {
|
||||||
return hostname;
|
return guacd_hostname;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -96,8 +96,8 @@ public class GuacamoleSession {
|
|||||||
|
|
||||||
client = new SessionClient(
|
client = new SessionClient(
|
||||||
new GuacamoleClient (
|
new GuacamoleClient (
|
||||||
config.getHostname(),
|
config.getProxyHostname(),
|
||||||
config.getPort()
|
config.getProxyPort()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -1,2 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-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>
|
||||||
|
@@ -17,9 +17,9 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
|
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
|
||||||
|
|
||||||
<!-- Basic config -->
|
<!-- Basic config -->
|
||||||
|
|
||||||
<welcome-file-list>
|
<welcome-file-list>
|
||||||
<welcome-file>index.html</welcome-file>
|
<welcome-file>index.html</welcome-file>
|
||||||
</welcome-file-list>
|
</welcome-file-list>
|
||||||
@@ -29,9 +29,19 @@
|
|||||||
30
|
30
|
||||||
</session-timeout>
|
</session-timeout>
|
||||||
</session-config>
|
</session-config>
|
||||||
|
|
||||||
<!-- Servlets -->
|
<!-- 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>
|
<servlet>
|
||||||
<description>Outbound servlet.</description>
|
<description>Outbound servlet.</description>
|
||||||
<servlet-name>Outbound</servlet-name>
|
<servlet-name>Outbound</servlet-name>
|
||||||
@@ -41,7 +51,7 @@
|
|||||||
<servlet-name>Outbound</servlet-name>
|
<servlet-name>Outbound</servlet-name>
|
||||||
<url-pattern>/outbound</url-pattern>
|
<url-pattern>/outbound</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
<servlet>
|
<servlet>
|
||||||
<description>Input servlet.</description>
|
<description>Input servlet.</description>
|
||||||
<servlet-name>Inbound</servlet-name>
|
<servlet-name>Inbound</servlet-name>
|
||||||
@@ -51,5 +61,5 @@
|
|||||||
<servlet-name>Inbound</servlet-name>
|
<servlet-name>Inbound</servlet-name>
|
||||||
<url-pattern>/inbound</url-pattern>
|
<url-pattern>/inbound</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
</web-app>
|
</web-app>
|
||||||
|
Reference in New Issue
Block a user