我已经使用这两个指南来安装/配置eclipse和Tomcat。
http://wolfpaulus.com/jounal/mac/tomcat7
http://www.banym.de/eclipse/install-tomcat-with-eclipse
我可以通过Eclipse中的服务器选项卡启动Tomcat。但是当我尝试浏览我的webapp时,我无法在浏览器中看到它。我查看了部署的文件夹,我的webapp就在那里。我甚至在其中创建了一个hello.jsp,当我尝试查看它时,我收到了404 HTTP错误。
这是我配置为使用tomcat的Eclipse的屏幕截图。它还显示了我创建的已部署目录和hello.jsp文件。
http://i.imgur.com/omcWpdH.jpg
这是我的浏览器无法看到hello.jsp的截图。
http://i.imgur.com/qCaNoEN.jpg
我创建了另一个hello.jsp并将其放在$ TOMCAT_INSTALL_FOLDER / webapps / ROOT中,我可以在浏览器中看到它。
任何想法可能出错?
由于
PS。这是我启动tomcat时的控制台eclipse输出。顶部有一个警告,但在stackoverflow中读取另一个讨论,据说我可以忽略它。
Aug 12, 2013 2:37:31 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/vill0042/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
Aug 12, 2013 2:37:31 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:directory' did not find a matching property.
Aug 12, 2013 2:37:31 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Aug 12, 2013 2:37:31 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Aug 12, 2013 2:37:31 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 868 ms
Aug 12, 2013 2:37:31 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Aug 12, 2013 2:37:31 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
Aug 12, 2013 2:37:34 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Aug 12, 2013 2:37:34 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [144] milliseconds.
log4j:WARN No appenders could be found for logger (org.springframework.web.servlet.DispatcherServlet).
log4j:WARN Please initialize the log4j system properly.
Aug 12, 2013 2:37:34 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'spring'
Aug 12, 2013 2:37:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/apache-tomcat-7.0.42/webapps/docs
Aug 12, 2013 2:37:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/apache-tomcat-7.0.42/webapps/examples
Aug 12, 2013 2:37:39 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Aug 12, 2013 2:37:39 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Aug 12, 2013 2:37:39 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@25c5738d')
Aug 12, 2013 2:37:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/apache-tomcat-7.0.42/webapps/host-manager
Aug 12, 2013 2:37:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/apache-tomcat-7.0.42/webapps/manager
Aug 12, 2013 2:37:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/apache-tomcat-7.0.42/webapps/ROOT
Aug 12, 2013 2:37:39 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Aug 12, 2013 2:37:39 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Aug 12, 2013 2:37:39 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 8157 ms