Advertisement
Guest User

Untitled

a guest
May 3rd, 2016
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 KB | None | 0 0
  1. <web-app id="WebApp_ID" version="2.4"
  2. xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
  4. http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  5.  
  6. <display-name>Spring Web MVC Application</display-name>
  7.  
  8. <servlet>
  9. <servlet-name>mvc-dispatcher</servlet-name>
  10. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  11. <load-on-startup>1</load-on-startup>
  12. </servlet>
  13.  
  14. <servlet-mapping>
  15. <servlet-name>mvc-dispatcher</servlet-name>
  16. <url-pattern>/</url-pattern>
  17. </servlet-mapping>
  18.  
  19. <context-param>
  20. <param-name>contextConfigLocation</param-name>
  21. <param-value>/WEB-INF/mvc-dispatcher-servlet.xml</param-value>
  22. </context-param>
  23.  
  24. <listener>
  25. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  26. </listener>
  27.  
  28. <!-- Spring Security -->
  29. <filter>
  30. <filter-name>springSecurityFilterChain</filter-name>
  31. <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
  32. <init-param>
  33. <param-name>contextAttribute</param-name>
  34. <param-value>org.springframework.web.servlet.FrameworkServlet.CONTEXT.dispatcher</param-value>
  35. </init-param>
  36. </filter>
  37.  
  38. <filter-mapping>
  39. <filter-name>springSecurityFilterChain</filter-name>
  40. <url-pattern>/*</url-pattern>
  41. </filter-mapping>
  42.  
  43. </web-app>
  44.  
  45. <beans xmlns="http://www.springframework.org/schema/beans"
  46. xmlns:context="http://www.springframework.org/schema/context"
  47. xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  48. xsi:schemaLocation="
  49. http://www.springframework.org/schema/beans
  50. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  51. http://www.springframework.org/schema/context
  52. http://www.springframework.org/schema/context/spring-context-3.0.xsd
  53. http://www.springframework.org/schema/mvc
  54. http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
  55.  
  56. <context:component-scan base-package="com.resource" />
  57.  
  58. <mvc:annotation-driven />
  59.  
  60. <bean id="dataSource"
  61. class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  62. <property name="driverClassName" value="com.mysql.jdbc.Driver" />
  63. <property name="url" value="jdbc:mysql://localhost:3306/userbase" />
  64. <property name="username" value="username" />
  65. <property name="password" value="password" />
  66. </bean>
  67.  
  68. </beans>
  69.  
  70. HTTP Status 500 - No WebApplicationContext found: no ContextLoaderListener registered?
  71.  
  72. type Exception report
  73.  
  74. message No WebApplicationContext found: no ContextLoaderListener registered?
  75.  
  76. description The server encountered an internal error that prevented it from fulfilling this request.
  77.  
  78. exception
  79.  
  80. java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
  81. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:252)
  82. note The full stack trace of the root cause is available in the Apache Tomcat/7.0.68 logs.
  83.  
  84. Apache Tomcat/7.0.68
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement