电信主站 网通分站
购买流程 付款方式 常见问题 在线提问 续租服务 购物车
用户名: 密 码: 忘记密码?
首 页
域名注册
虚拟主机
双线主机
服务器租用
VPS主机
企业邮局
代理专区
客服中心
虚拟主机行业资讯 虚拟主机评测对比 互联网最新动态 技术学院 站长资讯 在线教程 网站运营
搜索优化 服务器 网络编程 图形图象 站长之家 网页制作 操作系统
冲浪宝典 软件教学 视频通信 办公软件 邮件系统 网络安全 认证考试
您当前位置:西部数码->资讯中心-> 在线教程-> JSP教程
Running The Tomcat 4.0(英文,关键部分译成了中文。)-JSP教程,J2EE/EJB/服务器
作者:网友供稿 点击:14
  西部数码-全国虚拟主机10强!20余项虚拟主机管理功能,全国领先!第6代双线路虚拟主机,南北访问畅通无阻!虚拟主机可在线rar解压,自动数据恢复设置虚拟目录等.虚拟主机免费赠送访问统计,企业邮局.Cn域名注册10元/年,自助建站480元起,免费试用7天,满意再付款!P4主机租用799元/月.月付免压金!
文章页数:[1] 
               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:
怎么要让tomcat跑起来呢?

(0) download and install a java development kit
下载安装jdk,并设置java_home
* 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 distribution
下载tomcat4,并解到某一目录下,设置catalina_home 为tomcat的目录。
note:  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.0

there 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:
根据不同的操作系统执行不同的命令来启动tomcat
      %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:
好啦,现在可以访问tomcat了。
    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.0

there 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:
根据不同的操作系统执行不同的命令来启动tomcat
      %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 instances
这部分一开始就不要看啦。
in 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
这是工具目录,jsp编译后的临时文件所在
* work - temporary working directories for web applications

if 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:
8080端口被别的程序如webserver占用啦。
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 isnt in use, and is
   greater than 1024, as ports less than or equal to 1024 require superuser
   access to bind to.
   
   restart tomcat and youre in business.  be sure that you replace the "8080"
   in the url youre using to access tomcat.  for example, if you change the
   port to 1977, you would request the url http://localhost:1977/.

该死的98下才会出的问题
2) an "out of environment space" error when running the batch files in
   win9x/me-based operating systems.
右击startup.bat和shutdown.bat文件,属性->memory,初始内存中输入4096。
   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.

机器名localhost找不到,不要理会下面的东西啦。一般来说,只要有网卡就不会出这个错的。
3) the localhost machine isnt found.  this could happen if youre behing a
   proxy.  if thats the case, make sure the proxy configuration for your
   browser knows that you shouldnt 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.


这其实就是tomcat自己的文档啦,呵呵,要养成看文档的习惯哦!
文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!
相关主题
文章页数:[1] 
Google
热门文章
·IReport与JasperReport开发详解一-JSP教程,Java技巧及代码
·JSTL(JSP标准标签库)介绍-JSP教程,资料/其它
·格式化输入日期时间控件 JieFormattedDateBox-JSP教程,Java技巧及代码
·JSTL简化JSP编码-JSP教程,Jsp/Servlet
·JUnit和单元测试入门简介-JSP教程,Java技巧及代码
·从数据库中读取一个图片并保存为一个图片文件-JSP教程,数据库相关
·Java Swing入门基础-JSP教程,Java技巧及代码
·IntelliJ IDEA培训-JSP教程,Java技巧及代码
·通过JSP的预编译消除性能瓶颈-JSP教程,Jsp/Servlet
·Java中利用JMF编写摄像头拍照程序-JSP教程,Java技巧及代码

最新文章
·J2ME中的时间处理方法
·J2ME播放声音流程简介
·J2ME开发之手机键盘使用注意问题
·J2ME 记录管理存储
·MVC模式在j2me项目中的应用(二)
·MVC模式在j2me项目中的应用(一)
·J2ME中使用记录存储系统(RMS)存储信息
·J2ME与MIDP开发(1)
·用简单的J2ME程序测试MIDlet的生命周期
·JAVA基础:提升JSP应用程序的七大绝招




版权申明:本站文章均来自网络,如有侵权,请联系我们,我们收到后立即删除,谢谢!

特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有。
  打印  刷新  关闭
返回首页 |关于我们 | 联系我们 | 付款方式 | 创业联盟 | 虚拟主机 | 资讯中心 | 友情链接 | 网站地图

版权所有 西部数码(www.west263.com)
CopyRight (c) 2002~2006 west263.com all right reserved.
公司地址:四川成都市万和路90号天象大厦4楼 邮编:610031
电话总机:028-86262244 86263048 86263408 86263960 86264018 86267838
售前咨询:总机转201 202 203 204 206 208
售后服务:总机转211 212 213 214
财务咨询:总机转224 223 传真:028-86264041 财务QQ:点击发送消息给对方635483282
售前咨询QQ:点击发送消息给对方2182518 点击发送消息给对方241975952 点击发送消息给对方275026793 点击发送消息给对方408235859
售后服务QQ:点击发送消息给对方17708515 点击发送消息给对方307742704 点击发送消息给对方287976517 点击发送消息给对方363783715
《中华人民共和国增值电信业务经营许可证》编号:川B2-20030065号