dwoo2dwoo commented on issue #349: GUACAMOLE-678: Implement new 
UriGuacamoleProperty
URL: https://github.com/apache/guacamole-client/pull/349#issuecomment-484766457
 
 
   @necouchman: thanks for the pointer!  I tried it and unfortunately it 
doesn't work.  I still get the default Tomcat page.  Connecting to the Docker 
container:
   
   ```
   [root@wsqaguac001a guacamole]# docker exec -it 52f5c4445af4 bash
   root@52f5c4445af4:/opt/guacamole# echo $WEBAPP_CONTEXT
   ROOT
   root@52f5c4445af4:/opt/guacamole# cd /usr/local/tomcat/webapps
   root@52f5c4445af4:/usr/local/tomcat/webapps# ls -ald ROOT* 
/opt/guacamole/guacamole.war
   -rw-r--r--. 1 root root 11982934 Apr 19 03:57 /opt/guacamole/guacamole.war
   drwxr-xr-x. 3 root root     4096 Apr 13 00:09 ROOT
   lrwxrwxrwx. 1 root root       28 Apr 19 03:58 ROOT.war -> 
/opt/guacamole/guacamole.war
   root@52f5c4445af4:/usr/local/tomcat/webapps# grep -i deploy 
../conf/server.xml
               unpackWARs="true" autoDeploy="true">
   ```
   
   The code in https://github.com/apache/guacamole-client/pull/300 works since 
the symlink is created; however, Tomcat is not re-deploying ROOT even though it 
is older than the war file.  Some random Googling implies that this is known 
behaviour; for example, see the reply in [this 
thread](https://coderanch.com/t/675618/application-servers/Deploying-WAR-Tomcat).
   
   > As a project we made a conscious decision not to deploy to root by default
   
   In this case, my earlier patch would have been rejected, since I'm replacing 
ROOT.  Unfortunately, https://github.com/apache/guacamole-client/pull/300 
doesn't allow me to replace ROOT either.  Would you be amenable to something 
like:
   ```
   --- start.sh    2019-04-18 03:24:58.834149054 -0400
   +++ /tmp/start.sh       2019-04-19 00:40:32.186160710 -0400
   @@ -575,8 +575,11 @@
    start_guacamole() {
   
        # Install webapp
   -    ln -sf /opt/guacamole/guacamole.war 
/usr/local/tomcat/webapps/${WEBAPP_CONTEXT:-guacamole}.war
   
   +    CONTEXT="${WEBAPP_CONTEXT:-guacamole}"
   +    ln -sf /opt/guacamole/guacamole.war 
/usr/local/tomcat/webapps/${CONTEXT}.war
   +    rm -rf /usr/local/tomcat/webapps/${CONTEXT}
   +
        # Start tomcat
        cd /usr/local/tomcat
        exec catalina.sh run
   ```
   If not, could you suggest an alternative approach?  Thanks again ... David
   
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to