如何配置tomcat   直接输入127.0.0.1或IP就可以访问项目首页。
我配置tomcat-5.5\conf\server.xml
 <Host name="localhost" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">
  <Context path="" docBase="gbms" reloadable="true">
<Resource
auth="Container"
description="DataSource JNDI"
name="jdbc/gbmsDB"
type="javax.sql.DataSource"
password="winfast"
driverClassName="com.mysql.jdbc.Driver"
maxIdle="100"
maxWait="5000"
username="root"
url="jdbc:mysql://localhost:3306/gbms"
maxActive="200"/>
</Context-->
      </Host>怎么老是没用???

解决方案 »

  1.   

     访问项目的首页不是在TOMCAT里配置的  是要在项目的WEB.XML中配置的
    在WEB.XML中加上
    <welcome-file-list>
    <welcome-file>首页显示的页面</welcome-file>
    </welcome-file-list>
      

  2.   

     访问项目的首页不是在TOMCAT里配置的  是要在项目的WEB.XML中配置的
    在WEB.XML中加上
    <welcome-file-list>
    <welcome-file>首页显示的页面</welcome-file>
    </welcome-file-list>
      

  3.   

    1.tomcat端口改了没有 原始是8080
       启动tomcat 访问地址:http://localhost:8080/ 看看能不能看到“小猫”页面2.你这个数据库连接池好像很奇怪,试试第一条,不行再给你写个连接池
      

  4.   

    web.xml里有这些东西。
    就是比如:http://192.168.0.1    
      输入此地址出现的TOMCAT默认路径Root下的index.jsp   
      我现在映射一个发布目录gbms下的index.jsp  
      怎么在输入这个地址http://192.168.0.1
      出现的是我的gbms下的index.jsp而不是默认路径下的   
      怎么覆盖掉默认发布路径,我用的是tomcat5.0 
      

  5.   

    tomcat端口改了,现在就是输入http://192.168.0.1 出现小猫页面,不是出现我自己项目的首页
      

  6.   

    刚理解错了你的意思http://127.0.0.1/项目名首先将tomcat端口修改为80,这个会吧,不会再说其次,在项目根目录(webroot)下有个index.jsp,看到没有,没有的话新建一个
    将index.jsp 添加一句话:<jsp:forward page="主页的路径"></jsp:forward>主页路径可以是相对路径也可以是绝对路径不行的话,在web.xml中查看以下一下这个有没有配,没有配的话加上
      <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>就这样,希望你成功
      

  7.   

    http://127.0.0.1/gbms 可以正常显示  我现在的目的是直接输入http://127.0.0.1就能正常显示。
    web.xml中配置好了
    <welcome-file-list> 
        <welcome-file>index.jsp </welcome-file> 
      </welcome-file-list> 
      

  8.   

    1.至少到目前为止我是无能为力,按照我对web目前的理解,好像不能做到这一点2.因为,在本机上127.0.0.1你是访问tomcat的服务器,是不能直接到发布的项目的  做个比方,你去一家旅馆(tomcat主页 127.0.0.1) ,到了旅馆不一定到了你的卧室(你的项目),
      一个旅馆(tomcat)可以有好多个卧室(各种项目),  **到了旅馆,谁又知道指向那个卧室呢?(一个tomcat下可以有好多个项目)呵呵,我的理解
      

  9.   

    1.tomcat端口修改为80
    2.  <welcome-file-list> 
        <welcome-file>index.jsp </welcome-file> 
        </welcome-file-list> 
      

  10.   

    这些我都处理了  server.xml也改了  就是没用  
      

  11.   

     Cannot create JDBC driver of class '' for connect URL 'null'
      

  12.   

    楼主去tomcat的安装目录下的conf下的server-minimal.xml文件,打开找到<Service name="Catalina">
        <Connector port="8080" />    <!-- This is here for compatibility only, not required -->
        <Connector port="8009" protocol="AJP/1.3" />    <Engine name="Catalina" defaultHost="localhost">
          <Logger className="org.apache.catalina.logger.FileLogger" />      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                 resourceName="UserDatabase" />      <Host name="localhost" appBase="webapps" />
        </Engine>
      </Service>可见你输入localhost或你的ip地址,默认tomcat服务器会指向webapps,楼主修改一下这个相对路径试试。
    找你项目路径和webapps 容器的关系。
    这样应该能你输入localhost或你的ip地址就会默认指向你的项目页面。
      

  13.   

    <Context path="" docBase="" />
    在配置虚拟目录的时候吧PATH填空
      

  14.   


    我在conf下的server.xml里设置  不知道就是不起作用。
    网上也找了好多资料,就是没用
    知道怎么配置的  帮个忙哦。
    MSN:[email protected]
      

  15.   

    我在conf下的server.xml里设置  不知道就是不起作用。 
    网上也找了好多资料,就是没用 
    知道怎么配置的  帮个忙哦。 
    MSN:[email protected]