Handle System Banner
Previous: Advanced Server Configuration       Next: Other Tools and Features           Table of Contents

6. The Handle HTTP Proxy

Using the Proxy

If you enabled your handle server's HTTP interface during the setup process, or manually in the `config.dct' file, handles can be directly resolved on the server through a web browser. A handle server used in this manner is often referred to as a proxy server.

Using HTTP URLs allows handles to be resolved from standard web browsers without additional client software, but requires that the handles be associated with a specific proxy server. If that proxy server changes its DNS name or otherwise becomes invalid, the reference (i.e., the HTTP URL) to the handle will break. Thus selection or use of proxy servers should be carefully evaluated.

You can connect to the server's HTTP interface by opening a URL like http://127.0.0.1:8000. Replace 127.0.0.1 with the IP address or hostname of your Handle server. If you changed the HTTP port for the server replace 8000 with the correct port number. You should see a page like the one below.

img/webpage

It is also possible to build URLs to the proxy which will automatically resolve or redirect to a specified handle. For a Handle System Server with an IP address of 127.0.0.1 and HTTP interface port 8000 the handle my_handle00 can be resolved from a web browser through the URL http://127.0.0.1:8000/my_handle00.

If the allow_recursion option is set in the server's configuration, the HTTP interface will allow resolution of handles which are not stored on the local handle server. When a client requests and external handle the handle server will resolve the handle and return the results, just as if it were stored locally. This is how public proxy servers like hdl.handle.net and dx.doi.org are configured. If allow_recursion is disabled, the proxy will only allow resolution of handles stored on the local handle server.

Proxy servers are not part of any handle system administration or authentication hierarchy. The handle system protocol does not authenticate any response from a proxy server. Use of a proxy server is a client option, and the client may have to rely on the proxy server to authenticate any service response from handle system service components. Clients are responsible to set up their own trust relationship with the proxy server they select.

Using Custom HTML Pages

The Handle System proxy code supports customization of the query, response and error pages. Simple customization of the pages can be performed by modifying copies of the template files included in the `handle.jar' file. These templates are located in the jar directory `net/handle/server/html'.

Once the new templates are created, the server configuration must be modified to use them. See hdl_http_config, for instructions.

WWW Interface for Handle Administration

Though the built in proxy only allows resolution, the Handle System distribution comes with JavaTM servlets for handle administration. These servlets are meant to run in a web server using a JavaTM servlet engine like Apache Tomcat.

Instructions for use:

  1. Install JavaTM version 1.2 or greater on your computer. This can be obtained from the Handle Web site http://hdl.handle.net/4263537/4066.

  2. You will need to have a WWW server that supports JavaTM servlets.

  3. Download, gunzip, and untar the Handle System Server distribution.

  4. Under the new hsj-5.3 directory, extract the `src.jar' file. The files needed for setting up the web interface will be found under `net/handle/apps/admin_servlets'. There will be servlet code and one corresponding htdocs directory.

    `servlet code': for web administration and resolution.
    `htdocs': HTML files that will be returned from the servlet/proxy.

  5. Under the servlet directory, extract the 'net' directory from the handle.jar file.

  6. In `Admin.java', change the value of the YOUR_NAMING_AUTHORITY variable to your naming authority. Change the value of the 'ADMIN_NA' variable to your administrative naming authority. he default index values for SEC_KEY_IDX is 300 and ADMIN_GROUP_IDX is 200. Include `the handle.jar' file and the servlet library from your servlet engine (usually `jsdk.jar') to your CLASSPATH variable. Compile `Admin.java'.

  7. You will need to modify the HTML files under `net/handle/apps/admin_servlets/htdocs' to fit your specific purpose. Change the email address and naming authority found in the following html files: admin_footer.html, admin_login.html, help.html, index.html, qform.html
  8. `Admin.java' uses two parameters, TEMPLATE_DIR_KEY and BATCH_DIR_KEY, which are specified in the servlet properties file. TEMPLATE_DIR_KEY: path to html files
    BATCH_DIR_KEY: path to batch directory In an Apache JServ setup, the zone.properties file should be modified as follows:
     
       servlet.net.handle.apps.admin_servlet.Admin.initArgs=
       	admin_servlets.html_template_dir=<path to the html files>,
       	admin_servlets.dir=<path to the batch directory>
    
    In an Apache Jakarta-Tomcat setup, the web.xml file should be modified as follows:

     
       <init-param>
    	   <param-name>webadmin_servlets.html_template_dir</param-name>
               <param-value><path to the html files></param-value>
               <param-name>webadmin_servlets.batch_dir</param-name>
               <param-value><path to the batch directory></param-value>
       </init-param>
    

  9. To access the Admin servlet, use the following syntax:

     
       http://host/servlets/net.handle.apps.admin_servlets.Admin
    
    See configuration file for mount point for servlet zones.


Previous: The Handle HTTP Proxy       Next: Other Tools and Features           Table of Contents