如何配置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>怎么老是没用???
我配置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>怎么老是没用???
在WEB.XML中加上
<welcome-file-list>
<welcome-file>首页显示的页面</welcome-file>
</welcome-file-list>
在WEB.XML中加上
<welcome-file-list>
<welcome-file>首页显示的页面</welcome-file>
</welcome-file-list>
启动tomcat 访问地址:http://localhost:8080/ 看看能不能看到“小猫”页面2.你这个数据库连接池好像很奇怪,试试第一条,不行再给你写个连接池
就是比如:http://192.168.0.1
输入此地址出现的TOMCAT默认路径Root下的index.jsp
我现在映射一个发布目录gbms下的index.jsp
怎么在输入这个地址http://192.168.0.1
出现的是我的gbms下的index.jsp而不是默认路径下的
怎么覆盖掉默认发布路径,我用的是tomcat5.0
将index.jsp 添加一句话:<jsp:forward page="主页的路径"></jsp:forward>主页路径可以是相对路径也可以是绝对路径不行的话,在web.xml中查看以下一下这个有没有配,没有配的话加上
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>就这样,希望你成功
web.xml中配置好了
<welcome-file-list>
<welcome-file>index.jsp </welcome-file>
</welcome-file-list>
一个旅馆(tomcat)可以有好多个卧室(各种项目), **到了旅馆,谁又知道指向那个卧室呢?(一个tomcat下可以有好多个项目)呵呵,我的理解
2. <welcome-file-list>
<welcome-file>index.jsp </welcome-file>
</welcome-file-list>
<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地址就会默认指向你的项目页面。
在配置虚拟目录的时候吧PATH填空
我在conf下的server.xml里设置 不知道就是不起作用。
网上也找了好多资料,就是没用
知道怎么配置的 帮个忙哦。
MSN:[email protected]
网上也找了好多资料,就是没用
知道怎么配置的 帮个忙哦。
MSN:[email protected]