干吗不看看文档。
我现在用的是 w2k linux ,
没用过w98 。

解决方案 »

  1.   

    autoexec.bat:
    java_home=c:\jdk
    tomcat_home=c:\tomcat
    classpath=...
      

  2.   

    是不是在用tomcat前,网络要先配置好?网上邻居至少要能看到自己,能访问自己?
      

  3.   

    检查一下你的autoexec.bat文件,请首先确认你的jdk环境(或其他java环境)能够顺利的编译java程序。也就是用java命令可以运行class,只有这样可以了。才行。
      

  4.   

    the following txt is from 
    http://jakarta.apache.org/tomcat/tomcat-4.0-doc/RUNNING.txt
    $Id: RUNNING.txt,v 1.2 2001/08/27 20:22:37 craigmcc Exp $
                   Running The Tomcat 4.0 Servlet/JSP Container
                   ============================================This subproject contains Tomcat 4.0, a server that implements the Servlet 2.3
    and JSP 1.2 Specifications from Java Software.  In order to install and run
    this container, you must do the following:
    (0) Download and Install a Java Development Kit* Download a Java Development Kit (JDK) release (version 1.2 or later) from:    http://java.sun.com/j2se/* Install the JDK according to the instructions included with the release.* Set an environment variable JAVA_HOME to the pathname of the directory
      into which you installed the JDK release.
    (1) Download and Install the Tomcat 4.0 Binary DistributionNOTE:  As an alternative to downloading a binary distribution, you can create
    your own from the Tomcat source repository, as described in "BUILDING.txt".
    If you do this, the value to use for "${catalina.home}" will be the "dist"
    subdirectory of your source distribution.* Download a binary distribution of Tomcat from:    http://jakarta.apache.org/builds/jakarta-tomcat-4.0/nightly/  On a Windows platform, you will need:
        jakarta-tomcat-4.0-YYYYMMDD.zip  On a Unix platform, you will need:
        jakarta-tomcat-4.0-YYYYMMDD.zip* Unpack the binary distribution into a convenient location so that the
      distribution resides in its own directory (conventionally named
      "jakarta-tomcat-4.0").  For the purposes of the remainder of this document,
      the symbolic name "${catalina.home}" is used to refer to the full
      pathname of the release directory.
    (2) Start Up Tomcat 4.0There are two techniques by which Tomcat 4.0 can be started:* Via an environment variable:
      - Set an environment variable CATALINA_HOME to the path of the directory
        into which you have installed Tomcat 4.0.
      - Execute the shell command:      %CATALINA_HOME%\bin\startup             (Windows)      $CATALINA_HOME/bin/startup.sh           (Unix)* By modifying your current working directory:
      - Execute the following shell commands:      cd %CATALINA_HOME%\bin                  (Windows)
          startup                                 (Windows)      cd $CATALINA_HOME/bin                   (Unix)
          ./startup.sh                            (Unix)After startup, the default web applications included with Tomcat 4.0 will be
    available by browsing:    http://localhost:8080/Further information about configuring and running Tomcat 4.0 can be found in
    the documentation included here, as well as on the Tomcat web site:    http://jakarta.apache.org/tomcat/
    (3) Shut Down Tomcat 4.0There are two techniques by which Tomcat 4.0 can be stopped:* Via an environment variable:
      - Set an environment variable CATALINA_HOME to the path of the directory
        into which you have installed Tomcat 4.0.
      - Execute the shell command:      %CATALINA_HOME%\bin\shutdown            (Windows)      $CATALINA_HOME/bin/shutdown.sh          (Unix)* By modifying your current working directory:
      - Execute the following shell commands:      cd %CATALINA_HOME%\bin                  (Windows)
          shutdown                                (Windows)      cd $CATALINA_HOME/bin                   (Unix)
          ./shutdown.sh                           (Unix)
    (4) Advanced Configuration - Multiple Tomcat 4 InstancesIn many circumstances, it is desireable to have a single copy of a Tomcat 4
    binary distribution shared among multiple users on the same server.  To make
    this possible, you must configure a CATALINA_BASE environment variable (in
    addition to CATALINA_HOME as described above) that points to a directory
    that is unique to your instance.When you do this, Tomcat 4 will calculate all relative references for files in
    the following directories based on the value for CATALINA_BASE instead of
    CATALINA_HOME:* conf - Server configuration files (including server.xml)* logs - Log and output files* webapps - Automatically loaded web applications* work - Temporary working directories for web applicationsIf you do not set CATALINA_BASE to an explicit value, it will be initialized
    to the same value as is set for CATALINA_HOME (which means that the same
    directory is used for all relative path resoluations).
    (5) Troubleshooting:There are only really 3 things that can go wrong during the stand-alone
    Tomcat 4.0 install:1) The most common hiccup is when another web server (or any process for that
       matter) has laid claim to port 8080.  This is the default HTTP port that
       Tomcat attempts to bind to at startup.  To change this, open the file:       $CATALINA_HOME/conf/server.xml
        
       ...and search for '8080'.  Change it to a port that isn't in use, and is
       greater than 1024, as ports less than or equal to 1024 require superuser
       access to bind to.
       
       Restart Tomcat and you're in business.  Be sure that you replace the "8080"
       in the URL you're using to access Tomcat.  For example, if you change the
       port to 1977, you would request the URL http://localhost:1977/.2) An "out of environment space" error when running the batch files in
       Win9X/ME-based operating systems.   Right-click on the STARTUP.BAT and SHUTDOWN.BAT files.  Click on
       "Properties" then on the "Memory" tab.  For the "Initial environment" field,
       enter in something like 4096.
       
       After you click apply, Windows will create shortcuts in the directory with
       which you can use to start and stop the container.3) The 'localhost' machine isn't found.  This could happen if you're behing a
       proxy.  If that's the case, make sure the proxy configuration for your
       browser knows that you shouldn't be going through the proxy to access the
       "localhost" machine.
       
       In Netscape, this is under Edit/preferences -> Advanced/proxies, and in
       Internet Explorer, Tools -> Internet Options -> Connections -> LAN Settings.
      

  5.   

    you should config JAVA_HOME path
      

  6.   

    在windows环境下安装tomcat 
    文章出处:飞鸟原创 
      安装jdk1.3
      注意: 如果你安装过1.3之前的java版本,请删除该版本的所有文件,并用rregedit删除 HKEY_LOCAL_MACHINE\software\javasoft下面所有内容。
      然后再安装jdk1.3
      请这里下载jdk1.3:
      http://www.chinaasp.com/download/readFolder.asp?folder=JspDev&name=JSP%BF%AA%B7%A2%B0%FC
      然后注意如果你的系统是中文系统,系统注册表会有问题,请用用regedit打开注册表查javasoft,
      位置为hkey_local_machine -> software -> javasoft -> 找到 “Java 运行时环境”
      把这个东东 导出到文件 1.reg....
      然后用notepad编辑它,把"Java 运行时环境"替换成"Java Runtime Environment"然后导入。
      
      
      下载tomcat
      win32版本 http://jakarta.apache.org/builds/tomcat/release/v3.1/bin/jakarta-tomcat.zip 2.26mb
      
      安装tomcat
      将jakarta-tomcat.zip包内文件解压缩到 x:\tomcat。x是驱动器名
      
      设置环境变量
      win9x在autoexec.bat里面用set 语句来设定环境变量,如:set TOMCAT_HOME=d:\tomcat
      winnt/win2k可以选择我的电脑,右键点出菜单,选择属性,弹处对话框"系统特性", 选择"高级"tab,然后点按钮"环境变量",即可以编辑系统的环境变量。
      TOMCAT_HOME 值:x:\tomcat (用TOMCAT_HOME指示tomcat的根目录)
      JAVA_HOME 值:x:\jdk1.3 (用JAVA_HOME指示jdk1.3安装目录)
      CLASSPATH 值:x:\jdk1.3\lib\tools.jar;x:\tomcat\classes;x:\tomcat\lib
      
      测试tomcat
      运行 x:\tombat\bin\startup.bat
      然后在浏览器中键入 http://localhost:8080/,如果看到tomcat 3.1的画面,那就说明你成功的配置了tomcat3.1
      
      测试JSP
      现在我们建立目录 D:\myJSP
      里面放了一个文件:test.jsp,内容如下:
      <%@ page contentType="text/html;charset=gb2312" %>
      <%
      out.println("这是我的第一个jsp程序");
      %>
      修改 tomcat\conf\server.xml, 在这个文件的最后,你可以看到一些形如
      <Context path="/test" docBase="webapps/test" debug="0" reloadable="true" >
      </Context>
      等句子,我们在这句后面加上这句:
      <Context path="/myJSP" docBase="d:\myJSP" debug="0" reloadable="true" >
      </Context>
      path是web的虚拟目录,docBase是硬盘上的路径。
      然后我们在浏览器地址栏输入: http://localhost:8080/myJSP/test.jsp 
      (注意:tomcat区分大小写,如果写错大小写,将得到一个404错误)
      
      浏览器将显示如下内容:
      这是我的第一个jsp程序