
Originally Posted by
Luke Taylor
If you are a novice, then you should probably start without GAE and examine something like the tutorial sample application.
There's no reason why you shouldn't be able to use that configuration out of the box in GAE. Any normal Spring Security application should run in GAE, with obvious limitations on the type of security repository available (lack of JDBC, for example).
You will probably have to write your own UserDetailsService or AuthenticationProvider, but from a Spring Security perspective, nothing GAE-specific is required.
Luke Tayler, thank you very much for continuing to help. I actually did as you suggested, i.e. I first passed the 'petclinic' tutorial successfully:
and then tried to bring it to GAE. There is only a few things there to do to get Spring Security enable on a working SpringMVC application:
1. adding dependencies: I imported all of needed jar files,
2. adding "applicationContext-security.xml" with code:
Code:
<http use-expressions="true">
<intercept-url pattern="/" access="permitAll"/>
<intercept-url pattern="/static/**" filters="none" />
<intercept-url pattern="/**" access="isAuthenticated()" />
<form-login />
<logout />
</http>
3. updating the web.xml file:
Code:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext-jdbc.xml
/WEB-INF/applicationContext-security.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>
After doing all of these, checking many times the config. files and their dependencies again failed. In fact I did whatever came to my mind before asking help.
Could you please kindly publish your project as a whole, so that I import into Eclipse and play with it please?