肯定有错误信息显示,只是你还没来得及看,窗口就被关闭了。打开一个cmd窗口,到c:\tomcat\bin下,在命令行上键入startup,看看显示什么信息。

解决方案 »

  1.   

    不明白,我的tomcat安装目录下面并没有startup.bat
    我同时下载了两个文件,一个是可执行文件,执行tomcat安装程序,。另一个文件是jakarta-tomcat-5.5.3,他里面的bin里有startup.bat,我执行它后一闪而过。请问是执行它吗?
      

  2.   

    我把那个startup.bat拷贝到c盘根目录下,然后cmd 运行时提示:CATALINA_HOME enviromment variable not define correctly
      

  3.   

    是你的TOMCAT配置或者安装的有问题,正常的是有STARTUP.BAT这个启动批处理文件的,你用的TOMCAT版本是多少!?
      

  4.   

    为什么我的tomcat安装目录下面bin里没有startup.bat啊?
    我是下载了一个.exe文件一个.zip文件,exe文件执行安装程序,zip文件的bin下有startup.bat,可是执行时一闪而过
      

  5.   

    你可以试一试catalina run命令,而不是startup.bat命令,有别于后者的是,前者可以显示服务器启动时的出错信息.
      

  6.   

    下载地址:
    http://apache.ziropay.org/jakarta/tomcat-5/v5.5.3/
      

  7.   

    tomcat 5.5.x 要求用j2se 1.5。
      

  8.   

    To turn on servlet reloading, edit install_dir/conf/server.xml and add a DefaultContext subelement to the main Host (Tomcat 5.0.20 and later) or Service (Tomcat 5.0.19 and earlier) element and supply true for the reloadable attribute. For example, in Tomcat 5.0.27, search for this entry:         <Host name="localhost" debug="0" appBase="webapps" 
                                                                ...>and then insert the following immediately below it: 
            <DefaultContext reloadable="true"/>
      

  9.   

    5. Change the Port to 80
    Assuming you have no other server already running on port 80, you'll find it convenient to configure Tomcat to run on the default HTTP port (80) instead of the out-of-the-box port of 8080. Making this change lets you use URLs of the form http://localhost/blah instead of http://localhost:8080/blah. Note that you need admin privileges to make this change on Unix. Also note that some versions of Windows XP automatically start IIS on port 80. So, if you use XP and want to use port 80 for Tomcat, you may need to disable IIS (see the Administrative Tools section of the Control Panel). 
    To change the port, edit install_dir/conf/server.xml and change the port attribute of the Connector element from 8080 to 80, yielding a result similar to that below. Note that the exact form of the Connector element varies in different Tomcat versions. Just search for a non-comment occurrence of "8080".     <Connector port="80" ...
          maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
          ...
        ... />
      

  10.   

    6. Enable the Invoker Servlet
    The invoker servlet lets you run servlets without first making changes to your Web application's deployment descriptor (i.e., the WEB-INF/web.xml file). Instead, you just drop your servlet into WEB-INF/classes and use the URL http://host/servlet/ServletName (or http://host/webAppName/servlet/ServletName once you start using your own Web applications; see Section 2.11 of the book for details on Web apps). The invoker servlet is extremely convenient when you are learning and even when you are doing your initial development. But, as discussed in the book, you do not want it on at deployment time. Up until Apache Tomcat 4.1.12, the invoker was enabled by default. However, a security flaw was uncovered whereby the invoker servlet could be used to see the source code of servlets that were generated from JSP pages. Although this may not matter in most cases, it might reveal proprietary code to outsiders, so, as of Tomcat 4.1.12, the invoker was disabled by default. The Jakarta project has since fixed the problem, but they still disable the invoker servlet by default. You almost certainly want to enable it when learning, but you should disable it again before deploying any real applications. 
    To enable the invoker servlet, uncomment the following servlet and servlet-mapping elements in install_dir/conf/web.xml. Note that the filename is web.xml, not server.xml as in the previous bullets. Also, do not confuse this Apache Tomcat-specific web.xml file with the standard one that goes in the WEB-INF directory of each Web application. Finally, remember to make a backup copy of the original version of this file before you make the changes.     <servlet>
            <servlet-name>invoker</servlet-name>
            <servlet-class>
              org.apache.catalina.servlets.InvokerServlet
            </servlet-class>
            ...
        </servlet>    ...    <servlet-mapping>
            <servlet-name>invoker</servlet-name>
            <url-pattern>/servlet/*</url-pattern>
        </servlet-mapping>