Installing and Using

    Installing GNU-Paperclips on Hurd, Linux or Windows
    Running GNU-Paperclips

Installing GNU-Paperclips

Pre-Requisites

You must have the following:

GNU/Hurd or GNU/Linux

Here is a basic installation script for a GNU/Hurd or GNU/Linux system:
  1. download the appropriate archive file.
  2. unpack the archive file in the appropriate directory like this:

  3.     gunzip gnupaperclips.tar.gz
        tar xvf gnupaperclips.tar
     

  4. run the GNU-Paperclips start up file like this:

  5.         ./paperclips.sh
     
     

Windows

Here is a basic installation script for a Windows system:

Note: Windows users must download gzip to do this. You can get gzip from here.

  1. download the appropriate archive file.
  2. unpack the archive file in the appropriate directory like this:

  3.     gzip -d gnupaperclips.gz
     

  4. run the GNU-Paperclips start up file like this:

  5.         paperclips.bat
     

Running GNU-Paperclips

Startup arguments and defaults

GNU-Paperclips can take name=value pairs on the command line and construct ServletContext attributes with them. GNU-Paperclips uses Servlet-Context attributes to set some of its internal parameters.

The following is a list of some of these parameters. All attribute names are prefixed with the package name of gnu.paperclips.
 

Attribute name Use Default value
threads the number of threads to start in the HTTP server.
20
port the TCP port number to start the HTTP server on
7171
servinfo the string that will be returned by the ServletContext.getServerInfo() method. GNU-Paperclips Web Server 1999
logstamp the string printed at the start of each logging message Paperclips
docroot the directory name of any document root for a web server hosted by GNU-Paperclips /paperclips/docs
stacktrace true or false depending on whether you want stack traces to appear in any exceptions that are logged true
chunkedencodingbuffersize an integer which specifies how big an individual chunk should be in bytes
5000
contentlengthbuffersize an integer which specifies how big the buffer should be when doing content-length buffering; if a servlet's output exceeds this then the content-length will not be set by Paperclips; the value is expressed in bytes
20000

Here is an example of how to run Paperclips and set some attributes to start the server with 500 connection handlers on port 8080 and taking documents from the /docs directory:

./paperclips.sh gnu.paperclips.threads=500 \
    gnu.paperclips.port=8080 \
    gnu.paperclips.docroot=/docs
Notes: When this command is run the logging output from GNU-Paperclips appears on the console. It is possible to redirect the output to a file using the normal redirection operators.
 

More Advanced

More advanced stuff on using Paperclips, including how to serialize the state of the engine so you don't have to start up and configure it every time, is available from this link.
 


Created: 1 July 1999 Last Updated:  Contact: webmaster Author: Nic Ferrier