当前位置: 代码迷 >> Java Web开发 >> 大家帮帮忙给解决下啊好多天了。tomcat启动正常,但是http://localhost:8080/网页无法打开,(异常代码:102)
  详细解决方案

大家帮帮忙给解决下啊好多天了。tomcat启动正常,但是http://localhost:8080/网页无法打开,(异常代码:102)

热度:533   发布时间:2016-04-13 22:30:09.0
大家帮帮忙给解决下啊,好多天了。tomcat启动正常,但是http://localhost:8080/网页无法打开,(错误代码:102)
本帖最后由 fenggokoo 于 2015-04-10 21:35:55 编辑
环境变量也是OK的,JAVA_HOME  CLASSPATH   PATH 都加上了。
下面是启动日志




2015-4-10 21:21:15 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.20.
2015-4-10 21:21:15 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2015-4-10 21:21:16 org.apache.coyote.http11.Http11AprProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2015-4-10 21:21:16 org.apache.coyote.ajp.AjpAprProtocol init
信息: Initializing Coyote AJP/1.3 on ajp-8009
2015-4-10 21:21:16 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 817 ms
2015-4-10 21:21:16 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2015-4-10 21:21:16 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/5.5.33
2015-4-10 21:21:16 org.apache.catalina.core.StandardHost start
信息: XML validation disabled
2015-4-10 21:21:16 org.apache.catalina.core.ApplicationContext log
信息: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2015-4-10 21:21:17 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2015-4-10 21:21:17 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2015-4-10 21:21:17 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2015-4-10 21:21:17 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2015-4-10 21:21:17 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2015-4-10 21:21:17 org.apache.coyote.ajp.AjpAprProtocol start
信息: Starting Coyote AJP/1.3 on ajp-8009
2015-4-10 21:21:17 org.apache.catalina.storeconfig.StoreLoader load
信息: Find registry server-registry.xml at classpath resource
2015-4-10 21:21:17 org.apache.catalina.startup.Catalina start
信息: Server startup in 662 ms

------解决思路----------------------
tomcat环境变量呢,这个弄了没有
------解决思路----------------------
项目结构发出来,jsp放在web-inf下面的话是没有办法直接访问的

------解决思路----------------------
tomcat的默认首页是在webapps/doc文件夹里面的index.html,如果你没有这个页面,估计tomcat发现这个文件不存在的时候,就不显示了
------解决思路----------------------
 第一点需要检查下localhost是不是127.0.0.1, 如果ping localhost得到的不是127.0.0.1 , 请在windows/system32/drivers/etc/host文件增加一行代码 
127.0.0.1 localhost。
第二点 一般访问项目 需要增加项目名, 所以一般情况下是http://localhost:端口号(默认8080)/项目名。 如果访问的页面是404, 则一般是没首页,或者路径错误,需自己再做检查。
  相关解决方案