Hello Everyone, I just started programming in Spring. I started to create a web site with two page (Home & Body). I'm trying to use Spring Security to restrict access. To start I wanted to load the default login page that is shipped with Spring. But I'm having issues. The error I'm getting is:
I been searching through the forums and google and the solutions that people provided had to do with the jar files not being the right versions. I downloaded the jars file from the SpringSource.org website. I saved all the .jar files in the WEB-INF/lib folder. They ar all 3.2.0.M1HTML Code:Multiple annotations found at this line: - schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/security/spring- security-3.1.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
web.xml
applicationSecurity-Spring.xmlCode:<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>TFR_Spring_v1</display-name> <context-param> <param-name>contextConfigLocation</param-name> <param-value>WEB-INF/applicationSecurity-Spring.xml</param-value> </context-param> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <welcome-file-list> <welcome-file>TFR_Home.jsp</welcome-file> </welcome-file-list> </web-app>
The applicationSecurity-Spring file is very basic as I'm just trying to restict access to the two pages and have the defualt login page display, any suggestions?Code:<?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd"> <http auto-config="true"> <intercept-url pattern="/**" /> </http> </beans:beans>


Reply With Quote