2012-04-10 77 views
0

我在eclipse中有一个使用Tomcat7作为服务器的WTP项目,一切正常 - 当我启动服务器时,日志中没有错误,但tomcat没有出现 - 击中localhost:8080显示了我的404页面,我也检查了端口冲突,下面是tomcat启动时的日志。Tomcat7在eclipse中作为WTP项目未启动

Apr 10, 2012 11:07:36 AM 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: C:\Users\ashishs\Downloads 
Apr 10, 2012 11:07:36 AM org.apache.tomcat.util.digester.SetPropertiesRule begin 
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SK' did not find a matching property. 
Apr 10, 2012 11:07:36 AM org.apache.coyote.AbstractProtocol init 
INFO: Initializing ProtocolHandler ["http-bio-8081"] 
Apr 10, 2012 11:07:36 AM org.apache.coyote.AbstractProtocol init 
INFO: Initializing ProtocolHandler ["ajp-bio-8010"] 
Apr 10, 2012 11:07:36 AM org.apache.catalina.startup.Catalina load 
INFO: Initialization processed in 517 ms 
Apr 10, 2012 11:07:36 AM org.apache.catalina.core.StandardService startInternal 
INFO: Starting service Catalina 
Apr 10, 2012 11:07:36 AM org.apache.catalina.core.StandardEngine startInternal 
INFO: Starting Servlet Engine: Apache Tomcat/7.0.23 
Apr 10, 2012 11:07:37 AM org.apache.catalina.core.ApplicationContext log 
INFO: Initializing Spring root WebApplicationContext 
Apr 10, 2012 11:07:37 AM org.springframework.web.context.ContextLoader initWebApplicationContext 
INFO: Root WebApplicationContext: initialization started 
Apr 10, 2012 11:07:37 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh 
INFO: Refreshing Root WebApplicationContext: startup date [Tue Apr 10 11:07:37 IST 2012]; root of context hierarchy 
Apr 10, 2012 11:07:37 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/spring-security.xml] 
Apr 10, 2012 11:07:37 AM org.springframework.security.core.SpringSecurityCoreVersion <clinit> 
INFO: You are running with Spring Security Core 3.0.6.RELEASE 
Apr 10, 2012 11:07:37 AM org.springframework.security.config.SecurityNamespaceHandler <init> 
INFO: Spring Security 'config' module version is 3.0.6.RELEASE 
Apr 10, 2012 11:07:37 AM org.springframework.security.config.http.HttpSecurityBeanDefinitionParser checkFilterChainOrder 
INFO: Checking sorted filter chain: [Root bean: class [org.springframework.security.web.context.SecurityContextPersistenceFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 300, Root bean: class [org.springframework.security.web.authentication.logout.LogoutFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 400, <org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0>, order = 800, Root bean: class [org.springframework.security.web.authentication.www.BasicAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1200, Root bean: class [org.springframework.security.web.savedrequest.RequestCacheAwareFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1300, Root bean: class [org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1400, Root bean: class [org.springframework.security.web.authentication.AnonymousAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1600, Root bean: class [org.springframework.security.web.session.SessionManagementFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1700, Root bean: class [org.springframework.security.web.access.ExceptionTranslationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1800, <org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0>, order = 1900] 
Apr 10, 2012 11:07:37 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/spring-hibernate.xml] 
Apr 10, 2012 11:07:38 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/spring-context.xml] 
Apr 10, 2012 11:07:38 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/spring-mvc.xml] 
Apr 10, 2012 11:07:38 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/spring-beans.xml] 
Apr 10, 2012 11:07:38 AM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties 
INFO: Loading properties file from ServletContext resource [/WEB-INF/database.properties] 
Apr 10, 2012 11:07:38 AM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties 
INFO: Loading properties file from ServletContext resource [/WEB-INF/yelp.properties] 
Apr 10, 2012 11:07:38 AM org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker postProcessAfterInitialization 
INFO: Bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0' of type [class org.springframework.transaction.annotation.AnnotationTransactionAttributeSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 
Apr 10, 2012 11:07:38 AM org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker postProcessAfterInitialization 
INFO: Bean 'org.springframework.transaction.config.internalTransactionAdvisor' of type [class org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 
Apr 10, 2012 11:07:38 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons 
INFO: Pre-instantiating singletons in org.s[email protected]1bc1fb9: defining beans [org.springframework.security.web.PortMapperImpl#0,org.springframework.security.web.context.HttpSessionSecurityContextRepository#0,org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy#0,org.springframework.security.authentication.ProviderManager#0,org.springframework.security.access.vote.AffirmativeBased#0,org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0,org.springframework.security.web.access.DefaultWebInvocationPrivilegeEvaluator#0,org.springframework.security.authentication.AnonymousAuthenticationProvider#0,org.springframework.security.web.savedrequest.HttpSessionRequestCache#0,org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint#0,org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0,org.springframework.security.config.http.UserDetailsServiceInjectionBeanPostProcessor#0,org.springframework.security.filterChainProxy,authenticationSuccessHandler,userDAO,userDetailsService,org.springframework.security.authentication.dao.DaoAuthenticationProvider#0,org.springframework.security.authentication.DefaultAuthenticationEventPublisher#0,org.springframework.security.authenticationManager,passwordEncoder,slingDataSource,sessionFactory,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,dashboardController,loginController,staticContentController,userController,yelpController,campaignDAOHibernateImpl,userHibernateDAOImpl,campaignManagerImpl,encryptionManagerImpl,userManagerImpl,yelpManagerImpl,propertyConfigurer,jspViewResolver,org.springframework.web.servlet.view.XmlViewResolver#0,jsonNames,org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0]; root of factory hierarchy 
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 
SLF4J: Defaulting to no-operation (NOP) logger implementation 
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 
Apr 10, 2012 11:07:39 AM org.springframework.orm.hibernate3.LocalSessionFactoryBean buildSessionFactory 
INFO: Building new Hibernate SessionFactory 
Apr 10, 2012 11:07:40 AM org.springframework.security.access.intercept.AbstractSecurityInterceptor afterPropertiesSet 
INFO: Validated configuration attributes 
Apr 10, 2012 11:07:40 AM org.springframework.orm.hibernate3.HibernateTransactionManager afterPropertiesSet 
INFO: Using DataSource [[email protected]] of Hibernate SessionFactory for HibernateTransactionManager 
Apr 10, 2012 11:07:40 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/view.xml] 
Apr 10, 2012 11:07:40 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh 
INFO: Refreshing org.s[email protected]1b4cd65: startup date [Tue Apr 10 11:07:40 IST 2012]; parent: Root WebApplicationContext 
Apr 10, 2012 11:07:40 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons 
INFO: Pre-instantiating singletons in org.s[email protected]9d22fc: defining beans [jsonNames]; parent: org.s[email protected]1bc1fb9 
Apr 10, 2012 11:07:40 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/dashboard.htm] onto handler 'dashboardController' 
Apr 10, 2012 11:07:40 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/addSlingwallet.htm] onto handler 'dashboardController' 
Apr 10, 2012 11:07:40 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/login.htm] onto handler 'loginController' 
Apr 10, 2012 11:07:40 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/static-about-us.htm] onto handler 'staticContentController' 
Apr 10, 2012 11:07:40 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/signup-user.htm] onto handler 'userController' 
Apr 10, 2012 11:07:40 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/signup-page.htm] onto handler 'userController' 
Apr 10, 2012 11:07:40 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/testYelp.htm] onto handler 'yelpController' 
Apr 10, 2012 11:07:40 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/searchyelp.htm] onto handler 'yelpController' 
Apr 10, 2012 11:07:40 AM org.springframework.web.context.ContextLoader initWebApplicationContext 
INFO: Root WebApplicationContext: initialization completed in 3731 ms 
Apr 10, 2012 11:07:41 AM org.apache.catalina.core.ApplicationContext log 
INFO: Initializing Spring FrameworkServlet 'myappConsumer' 
Apr 10, 2012 11:07:41 AM org.springframework.web.servlet.FrameworkServlet initServletBean 
INFO: FrameworkServlet 'myappConsumer': initialization started 
Apr 10, 2012 11:07:41 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh 
INFO: Refreshing WebApplicationContext for namespace 'myappConsumer-servlet': startup date [Tue Apr 10 11:07:41 IST 2012]; parent: Root WebApplicationContext 
Apr 10, 2012 11:07:41 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/spring-mvc.xml] 
Apr 10, 2012 11:07:41 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/spring-beans.xml] 
Apr 10, 2012 11:07:41 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons 
INFO: Pre-instantiating singletons in org.s[email protected]1031310: defining beans [jspViewResolver,org.springframework.web.servlet.view.XmlViewResolver#0,jsonNames,dashboardController,loginController,staticContentController,userController,yelpController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0]; parent: org.s[email protected]1bc1fb9 
Apr 10, 2012 11:07:41 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/view.xml] 
Apr 10, 2012 11:07:41 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh 
INFO: Refreshing org.s[email protected]16b69d7: startup date [Tue Apr 10 11:07:41 IST 2012]; parent: WebApplicationContext for namespace 'myappConsumer-servlet' 
Apr 10, 2012 11:07:41 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons 
INFO: Pre-instantiating singletons in org.s[email protected]25b64d: defining beans [jsonNames]; parent: org.s[email protected]1031310 
Apr 10, 2012 11:07:41 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/dashboard.htm] onto handler 'dashboardController' 
Apr 10, 2012 11:07:41 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/addSlingwallet.htm] onto handler 'dashboardController' 
Apr 10, 2012 11:07:41 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/login.htm] onto handler 'loginController' 
Apr 10, 2012 11:07:41 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/static-about-us.htm] onto handler 'staticContentController' 
Apr 10, 2012 11:07:41 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/signup-user.htm] onto handler 'userController' 
Apr 10, 2012 11:07:41 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/signup-page.htm] onto handler 'userController' 
Apr 10, 2012 11:07:41 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/testYelp.htm] onto handler 'yelpController' 
Apr 10, 2012 11:07:41 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler 
INFO: Mapped URL path [/searchyelp.htm] onto handler 'yelpController' 
Apr 10, 2012 11:07:41 AM org.springframework.web.servlet.FrameworkServlet initServletBean 
INFO: FrameworkServlet 'myappConsumer': initialization completed in 133 ms 
Apr 10, 2012 11:07:41 AM org.apache.coyote.AbstractProtocol start 
INFO: Starting ProtocolHandler ["http-bio-8081"] 
Apr 10, 2012 11:07:41 AM org.apache.coyote.AbstractProtocol start 
INFO: Starting ProtocolHandler ["ajp-bio-8010"] 
Apr 10, 2012 11:07:41 AM org.apache.catalina.startup.Catalina start 
INFO: Server startup in 4398 ms 

回答

0

通常在Eclipse中部署Web项目时未映射到根路径,但是具有与项目名称相同的上下文路径。

也就是说,如果你的项目名称是 “WebTest的” 尝试打

http://localhost:8080/WebTest 

但是可以肯定在你的配置文件server.xml验证:

  • Tomcat的端口是8080
  • 您的上下文名称与项目名称映射
+0

yes..dash1e您是对的,但问题是一些在我的代码中,我现在意识到的其他事情.. 其实在文件org.eclipse.wst.common.component中,我的wb-module的部署名称与上下文根值不同。我使用wb-module的deploy-name作为我的上下文,但实际上它应该是上下文根值。 – Ashish 2012-04-10 10:13:49