⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 一个经典的java的web服务器的建立源代码
💻
字号:
                          Tornado HTTP Server
                            by Neil Conway
                    http://tornado.sourceforge.net
            $Id: README,v 1.11 2001/01/21 19:24:17 nconway Exp $

Introduction:

Tornado HTTP Server is a multi-threaded web server written in Java.
It aims to be secure, efficient and portable, and provide a full
implementation of HTTP 1.1. Advanced features such as GZip output
compression and web-based administration are planned.

Installation:

1) Tornado requires JDK 1.3.0 (either IBM or Sun). It would probably
   be fairly easy to get Tornado to run with JDK 1.2, but I don't have
   a copy on my system -- contributors are welcome. In addition to
   the JDK, Tornado also depends on the Ant build tool, and a
   JAXP compliant XML parser -- I recommend Apache Xerces.

  a) Install the appropriate JDK for your system. JDK installation
     can be complex, so I'll assume that it has already been set up
     and is working properly.

  b) Get Apache Xerces for Java from:

        http://xml.apache.org/xerces-j/
     
     You'll only need xerces.jar from the binary distribution.

  c) Add xerces.jar to your CLASSPATH

  d) Get Ant 1.2 or later from:

        http://jakarta.apache.org/ant/

     Again, all you'll need is the binary distribution.

  e) Follow the Ant installation instructions

2) Okay, now you're ready to install Tornado itself.

  a) Extract the Tornado distribution file:

        tar xzf tornado-x.y.z.tar.gz
        tar xIf tornado-x.y.z.tar.bz2
        unzip tornado-x.y.z.zip

     (Depending on the type of archive you downloaded.)
     
  b) Change into the directory with the Tornado sources.

        cd tornado-x.y.z

  c) Read the next section on "Configuration" - currently, that
     must be done BEFORE Tornado is compiled.

  d) Compile Tornado:

        ant

     This will create the 'build/' subdirectory with the
     compiled bytecode.

  e) Run Tornado:

        java tornado.Tornado

Configuration:

Unfortunately, the current configuration system for Tornado is both
obfuscated and unscalable. An XML-based configuration system is
planned (take a look in the conf/ subdirectory), but it is currently
being designed. Contributors are welcome.

So for the time being, you'll need to edit the actual Java source
code in order to change configuration variables. It's not difficult,
as you'll probably only need to change a few existing values.

In the Tornado source tree, open Configuration.java in a text editor
(such as vi). Most of the settings should be fairly self-explanatory,
but if you don't understand a variable, scroll down to the getxxx()
method which refers to that variable - that will contain a
description of the variable and its current usage.

One thing you'll need to remember to do is create the directory where
Tornado stores its logs. This is not done automatically. By default,
this directory is '/tmp/tornado-logs'.

Running Tests:

As of 0.2.1, Tornado includes a set of unit tests that can be used to
verify that Tornado is working correctly on your system. Please note:
running these tests is NOT necessary to get a working Tornado
installation. They are primarily included as a tool to help developers
verify that any changes do not break existing behavior.

1) First, you'll need to install the JUnit testing framework

  a) Download the latest stable version of JUnit from:

        http://www.junit.org

     You will only need junit.jar from the ZIP archive.

  b) Place junit.jar in your CLASSPATH

2) There is an extension to Ant 1.2 which makes running JUnit tests
   easier.

  a) Download optional.jar from:

        http://jakarta.apache.org/builds/jakarta-ant/release/v1.2/bin/

  b) Place optional.jar in $ANT_HOME/lib

3) Now you're ready to actually run the tests.

  a) Extract Tornado as explained in the 'Installation' section.

  c) Compile and run the tests:

        ant runtests

     This will run the tests and report the results. If you see
     any failures, you've found a bug. Please report it!

Feedback:

If you find a bug in Tornado, please tell me about it. If you've
got a feature suggestion or comments about Tornado, I'd love
to hear about it. Code contributions are even more appreciated!
For all these, please use our SourceForge project page:

    http://sourceforge.net/projects/tornado

If you're interested in helping with Tornado development, check
out the development webpage here:

    http://tornado.sourceforge.net/devel.html

And last but not least, feel free to get in touch with me
directly: send an email to klamath@users.sourceforge.net

License:

Tornado HTTP Server: A web server for Java
Copyright (C) 2000 Neil Conway

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -