saada logo

 
  SAADA OVERVIEW
Home  
News  
Tutos and Links  
Download  
  Tutorial
Getting started  
Doing More  
SaadaQL  
The Web Interface  
VO Publishing  
Tips & Troubelshooting  
  COMMUNITY
Mailing List  
Saada Sites  
How to Contact us ?  
  DEVELOPER CORNER
Contributors  
Next Step  
Old Releases  
Inside Saada  
Using UWS  

 

SourceForge.net Logo


HOME ART > Tutorial > The Web Interface
Managing the Web Interface

This section contains some tips to manage the Web interface. Please refer to the Apache doc before to do any complex setup.




 Running a SaadaDB behind HTTPd

  • The SaadaDB Web inetrface has to be operated by an Apache Tomcat server which is design to run Java servlet.
  • Usually Apache Tomcat are running in front-end server but behind an HTTPd (from Apache as well) server which more secure and more flexible.
  • There are 2 different ways to make HTTPd running as a Tomcat proxy server.
    • in Any case, make sure the cookie are transfered in both direction
    • Declaring a proxy session. Let’s suppose that the SaadaDB URL on Tomcat is http://TomcatHost:8080/SadaDBName and you want to make it public from the URL http://PublicServer/MyBase. You have to add the following proxy pass to the HTTPd configuration on PublicServer host
      ProxyPass MyBase http://TomcatHost:8080/SaadaDBName
      ProxyPassReverse /MyBase http://TomcatHost:8080/SaadaDBName
      ProxyPassReverseCookiePath /SaadaDBName /MyBase
    • Another way to proceed is to use the use the ajp protocol (apache module mod_jk). To be simple, we suppose here we are working with ajp 1.3 and that both tomcat and HTTPd use the same name for the Web application (SaadaDBName) .
      • Install the mod_jk Apache module (should be done by default) and declare it in the configuration file
        LoadModule jk_module modules/mod_jk.so
      • Declare a worker in the worker.properties file. This file is located in the same directory as HTTPd config.
        worker.list=saadaworker
        worker.autreworker.port=8009
        worker.autreworker.host=TomcatHost
        worker.autreworker.type=ajp13
        
      • Connect your SaadaDB Web interrface with the worker in the HTTPd configuration file :
        <VirtualHost *:80>
          Header set Access-Control-Allow-Origin "*"
          JkMount /SaadaDBName  saadaworker
          JkMount /SaadaDBName/* saadaworker
        </VirtualHost>
        
  • Once the proxy is working, you still have to declare the new URL to Saada. This is important to allow external tools (SAMP clients e.g.) to access services operated by the SaadaDB.
    • Open the Web Publishing panel of the admin tool
    • Type the new URL, save
    • Deploy the Web application
    • This operation can also be done by hand :
      • Edit carefully SAADADB_HOME/config/saadadb.xml
      • Deploy the Web interface (see article)
        % cd SAADADB_HOME/bin
        % ./sant tomcat.deploy
        

 Moving the SaadaDB web application

    • Open the Web Publishing panel of the admin tool
    • Type the new URL, save
    • Deploy the Web application
    • As before, this operation can also be done by hand :
      • Edit carefully SAADADB_HOME/config/saadadb.xml
      • Deploy the Web interface (see article)
        % cd SAADADB_HOME/bin
        % ./sant tomcat.deploy

 Others Tomcat parameters.

    • The file dbname.txt located at the Web application root contain some parameter which have to be edited by hand.
      • It can be use to change the Tomcat log file or to protect the file download with a pasword (to be declared in WEB-INF/web.xml)
      • This file is self documented
        ######################################################################
        # This file allows some WEB application set up to be achieved by hand
        # Require server restart
        #
        #########################
        # Can be used to make the web aplication working on another SaadaDB.
        # In this case, make sure the generated jar file is in WEB-INF/lib
        saadadbname=Asterics
        #########################
        # Web application base urls. Must be set when the appliaction is moved by hand from 
        #     a server to another or when the tomcat is pushed behind a proxy.
        urlroot=http://TomcatHost:8080/Asterics
        #########################
        # If true product download requires an authentication.
        # Authentication parameters must be set by hand in the tomcat config.
        # (refer to the tutorial).
        securedownlad=false
        #########################
        # Current SaadaDB root dir (no longer used)
        #saadadbroot=.......
        #########################
        # Set debug mode
        debug=off	
        #########################
        # Set the tomcat log file. Possible values are :
        #   none : Default Tomcat log file (TOMCAT_HOME/logs/catalina.out usually)
        #   default : The log file has the same name as the webapps (last field of urlroot or SaadaDB name)
        #            It is located in TOMCAT_HOME/logs/
        #   Other name : Full path of the log file if starts with /
        #               TOMCAT_HOME/logs//Othername.log otherwise
        #   (refer to the tutorial).
        logfile=default
        
      • Tomcat must be restarted to take into account its content.
      • TOMCAT_HOME/SaadaDBName/dbname.txt is overriden each time the Web application is deployed. If you want to make it persistant, edit SAADADB_HOME/web/dbname.txt and deploy te Web application as usual.

 Database description

  • You can add a specific HTML description of the database whch will be displayed when clicking on
    • This description is stored in the SAADADB_HOME/web/help/description.html
    • The Web application must de deployed to make that file public.

 Delegating the shopping cart download

  • The content of the shopping cart can be transfered to another server instead of being downloaded. This feature allows to directly feed a data processor with data selected from the Web interface. The way to proceed is described in SAADADB_HOME/web/userscripts local.js
last update 2016-06-13