"Simple Software"

Acegi/Spring Security JSF Integration Project continued

October 16th, 2008 by Derek

We’ve gotten a good number of comments from Lincoln’s latest post on Spring Security and JSF.  A few comments have asked for further code samples on how to get this example working.

We created a runnable project for this example, and it can be downloaded here.

All you need to do is extract the project to your workspace (We use Eclipse), and import the project.  Add the project to your server and start it up.  Next open your browser and navigate to:

http://localhost:8080/springsecurity/

Note*: You’ll need to change the URL to your server port number if it isn’t set to 8080.

Assuming all the steps above worked successfully you should see a page like the one below.

Now click on the Secret link.  This should force you to the login page.  The Secret page requires authentication to view.  Go ahead and type in the User: rod  Password: koala

You should now be redirected to the Secret page (shown below).

Go back to the Home page and try Logout, and Login with bad credentials and see what you get.  I hope this project helps to tie up any loose ends, and helps answer any outstanding questions.

Post to Twitter Post to Delicious Post to Digg Post to StumbleUpon

Posted in JSF, Java, Spring

4 Comments

  1. [...] can see a working example of this guide here. [...]

  2. Tyler says:

    Just a note, the login/secret pages will not work in all of IE (I haven’t tested it extensively). Check out the following post to see what I am referring to:

    http://mail-archives.apache.org/mod_mbox/tomcat-users/200409.mbox/%3C414BC539.1010204@globalmentor.com%3E

  3. Anselmo says:

    In page Login.jspx

    change de omit-xml-declaration = “true”/>

    you need the value to true to work in Internet Explorer

  4. John says:

    Hello, very interesting… But I think if there is any way to customize authorization needs because I want to create some in runtime. the roles in xml file are so hard-coded…

Leave a Comment




Please note: Comment moderation is enabled and may delay your comment from appearing. There is no need to resubmit your comment.

Search

Recent Posts

Recent Comments

OcpSoft Agile Management

Recent Tweets:

Posting tweet...

Sponsored By:

Resources

Meta