Announcement Announcement Module
Collapse
No announcement yet.
Issue while implementing spring security Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue while implementing spring security

    I am using GWT at my client side and spring 2.5.6 at my server side. I want to submit data using the https protocol hence I wish to use spring security. When I run the application in hosted mode I get the following exception.

    Code:
    org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]

    My spring-servlet.xml is as follows:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:security="http://www.springframework.org/schema/security"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd 
    	http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
    
    	 
    	 <security:http>
    	 	<security:intercept-url pattern="/gwtapplication/springActivitybyJsp.rpc" requires-channel="https"/>
     	 </security:http>
    	 
    	 <!-- Handler for GWT RPC calls  -->
    	 <!-- These calls can be routed to the same controller which handles the HTTP requests -->
        
        <!-- User Defined Bean which extends from MultiActionController -->
        <bean id="SpringActivityController"
    		  class="com.gwt.test.server.SpringActivityController" >
    		  <property name="methodNameResolver" ref="paramResolver"/>
    		  <property name="service" ref="userService"/>
        </bean>
        
             
        <!-- ParameterMethodNameResolver decides which method is to be called depending on the request parameter "method" -->
        
        <bean id="paramResolver" class="org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver">
        	<property name="paramName" value="method"/>
        </bean>
    		  
    	
    	<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    	      <property name="mappings">
    	      <props>
    	      		<prop key = "/gwtapplication/loginActivitybyJsp.rpc">
    	      			SpringActivityController
    	      		</prop>
    	      </props>
    	      </property>
       </bean>
    
    </beans>

    My web.xml is as follows:

    Code:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    
    <web-app>
    
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>/WEB-INF/spring-servlet.xml,/WEB-INF/spring-service.xml,/WEB-INF/spring-dao.xml</param-value>
    		
    	</context-param>
    
    
    	<listener>
    		<listener-class>
    			org.springframework.web.context.ContextLoaderListener 
             </listener-class>
    	</listener>
      <!-- Default page to serve -->
      <welcome-file-list>
        <welcome-file>/WEB-INF/test1.jsp<!-- GWTApplication.html --></welcome-file>
      </welcome-file-list>
      
      	<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>/loginActivity*</url-pattern>
    	</filter-mapping>
      
      
      <!-- Servlets -->
      	<!-- Testing spring rmi with gwt -->
    	<servlet>
                <servlet-name>GWTSpring</servlet-name>
                <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
                <load-on-startup>1</load-on-startup>
         </servlet>
         
        <servlet-mapping>
                  <servlet-name>GWTSpring</servlet-name>
                  <url-pattern>*.rpc</url-pattern>
         </servlet-mapping>
        
    </web-app>
    Please advise.
Working...
X