gpt4 book ai didi

tomcat - 关于Java Web项目服务器正常启动,但无法正常访问项目

转载 作者:行者123 更新时间:2023-11-28 23:20:38 25 4
gpt4 key购买 nike

有个小web程序源码,没有问题因为在我同学的机器上测试可以跑起来,但是我自己的环境tomcat服务器运行后报错只能访问localhost8080无法访问项目页面,显示404.也试过编译项目手动贴到webapps start,但还是无法访问项目。然后我重新配置了Myeclipse+tomcat的整个环境。几次都没用,就是重装了myeclispe,Tomcat改了几个。那么可能是什么问题呢?这是启动后的服务器日志:``

  五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/7.0.78
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: May 10 2017 15:02:19 UTC
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 7.0.78.0
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 7
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 6.1
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: D:Javajdk1.8jre
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.8.0_102-b14
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: D:apache-tomcat-7.0.78
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: D:apache-tomcat-7.0.78
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:apache-tomcat-7.0.78
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:apache-tomcat-7.0.78
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:apache-tomcat-7.0.78/common/endorsed
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.io.tmpdir=D:apache-tomcat-7.0.78temp
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.library.path=D:Javajdk1.8bin;D:apache-tomcat-7.0.78bin
五月 31, 2017 9:28:03 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dsun.io.useCanonCaches=false
五月 31, 2017 9:28:03 上午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: Loaded APR based Apache Tomcat Native library 1.2.12 using APR version 1.5.2.
五月 31, 2017 9:28:03 上午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
五月 31, 2017 9:28:04 上午 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL successfully initialized (OpenSSL 1.0.2k 26 Jan 2017)
五月 31, 2017 9:28:07 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-apr-8080"]
五月 31, 2017 9:28:07 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-apr-8009"]
五月 31, 2017 9:28:07 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 6195 ms
五月 31, 2017 9:28:07 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
五月 31, 2017 9:28:07 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.78
五月 31, 2017 9:28:07 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:apache-tomcat-7.0.78webappsdocs
五月 31, 2017 9:28:08 上午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [765] milliseconds.
五月 31, 2017 9:28:08 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:apache-tomcat-7.0.78webappsdocs has finished in 1,310 ms
五月 31, 2017 9:28:08 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:apache-tomcat-7.0.78webappsexamples
五月 31, 2017 9:28:09 上午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
五月 31, 2017 9:28:09 上午 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
五月 31, 2017 9:28:09 上午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@29107c23')
五月 31, 2017 9:28:09 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:apache-tomcat-7.0.78webappsexamples has finished in 781 ms
五月 31, 2017 9:28:09 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:apache-tomcat-7.0.78webappshost-manager
五月 31, 2017 9:28:09 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:apache-tomcat-7.0.78webappshost-manager has finished in 93 ms
五月 31, 2017 9:28:09 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:apache-tomcat-7.0.78webappsmanager
五月 31, 2017 9:28:09 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:apache-tomcat-7.0.78webappsmanager has finished in 78 ms
五月 31, 2017 9:28:09 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:apache-tomcat-7.0.78webappsROOT
五月 31, 2017 9:28:09 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:apache-tomcat-7.0.78webappsROOT has finished in 94 ms
五月 31, 2017 9:28:09 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:apache-tomcat-7.0.78webappsTax
五月 31, 2017 9:28:11 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
五月 31, 2017 9:28:11 上午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).

log4j:WARN Please initialize the log4j system properly.
五月 31, 2017 9:28:14 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:apache-tomcat-7.0.78webappsTax has finished in 4,543 ms
五月 31, 2017 9:28:14 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-apr-8080"]
五月 31, 2017 9:28:14 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-apr-8009"]
五月 31, 2017 9:28:14 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 7174 ms

最佳答案

检查项目的上下文根。右键单击项目并选择“属性”。然后,如果使用 MyEclipse 2017,请查看 Project Facets->Web 以找到 Web 上下文根。或者,如果使用 MyEclipse 2013 到 2016,请查看项目属性中的 MyEclipse->Project Facets->Web。确保通过输入 http://localhost:8080 访问您的项目(假设它已正确部署)后跟项目的上下文根。例如,如果您的上下文根是“my-app”,则输入“http://localhost:8080/my-app”。如果这不起作用,则您的项目可能尚未部署,您必须提供部署过程中任何错误的详细信息。

关于tomcat - 关于Java Web项目服务器正常启动,但无法正常访问项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44275498/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com