I tried to create a simple as possible application with spring security.
I have 3 html pages (secured.html,unsecured.html,and accessdenied.html - which I all put outside and same level of WEB-INF), and an xml to specify the security (springSecurity.xml at WEB-INF folder).
Functionality: I have one secured page (secured.html), which requires the specified role mentioned in springSecurity.xml. All implementations used are from spring (voters, authentication manager, etc.). In-memory dao authentication is used.
I am getting the error:
=======
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named '' is defined
=======
The entire error dump, and my spring and web.xml are below (the hmtls i made are simple htmls with one liners only).
(I am deploying on jboss 4.2.3. Some chunks of codes I used are from Spring in Action book.)
But looking like you are starting to learn it, I recommend using the latest versions of Spring and Spring Security. It is so way much easier than what you had to do there. A lot less xml and typing and makes things, well again way much more easier
But in general all you need is the ProxyChainFilter. In the xml you use the security namespace so that you just have something like (I don't have it memorized, so this is missing the correct tags and attributes, but the basic concept is the same and easy)
Web.xml
OK, I cheated and went to the docs and copied that stuff from that url I posted above.
Jesus Angeles wrote:
Is the difference merely on 'using annotations, instead of xml'?
No not at all, as you can see Spring Security is much different, it is much easier. The Spring in Action is a good book and most of the stuff is very valid today.
Mark
Jesus Angeles
Ranch Hand
Joined: Feb 26, 2005
Posts: 2038
posted
0
For 2.0.x, Spring in Action is the best for a beginner.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: [Spring 2.0.8/Security] Error: No bean named '' is defined