<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Acegi/Spring Security Integration &#8211; JSF Login Page</title> <atom:link href="http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/feed/" rel="self" type="application/rss+xml" /><link>http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/</link> <description>&#34;Simple Software&#34;</description> <lastBuildDate>Sat, 13 Mar 2010 17:57:39 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: Technical Blog &#187; JSF and Spring Security Integration with JSF login page</title><link>http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/comment-page-2/#comment-1236</link> <dc:creator>Technical Blog &#187; JSF and Spring Security Integration with JSF login page</dc:creator> <pubDate>Fri, 26 Feb 2010 17:59:31 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=16#comment-1236</guid> <description>[...] HttpRequestDispatcher to cause forword to /j_spring_security_check.jsp, there is one toturial on http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/ which shows how to implement [...]</description> <content:encoded><![CDATA[<p>[...] HttpRequestDispatcher to cause forword to /j_spring_security_check.jsp, there is one toturial on <a
href="http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/" rel="nofollow">http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/</a> which shows how to implement [...]</p> ]]></content:encoded> </item> <item><title>By: Lincoln</title><link>http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/comment-page-2/#comment-489</link> <dc:creator>Lincoln</dc:creator> <pubDate>Fri, 08 May 2009 13:01:11 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=16#comment-489</guid> <description>Update your default-target-url, etc, in the spring config.xml file:&lt;form-login login-processing-url=&quot;/j_spring_security_check&quot; login-page=&quot;/faces/login.jsf&quot;
default-target-url=&quot;/faces/home.jsf&quot; authentication-failure-url=&quot;/faces/login.jsf&quot; always-use-default-target=&quot;false&quot; /&gt;
&lt;logout invalidate-session=&quot;false&quot; logout-success-url=&quot;/faces/login.jsf&quot; /&gt;</description> <content:encoded><![CDATA[<p>Update your default-target-url, etc, in the spring config.xml file:</p><form
-login login-processing-url="/j_spring_security_check" login-page="/faces/login.jsf"<br /> default-target-url="/faces/home.jsf" authentication-failure-url="/faces/login.jsf" always-use-default-target="false" /><br
/> <logout
invalidate-session="false" logout-success-url="/faces/login.jsf" /></p> ]]></content:encoded> </item> <item><title>By: Pete</title><link>http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/comment-page-2/#comment-488</link> <dc:creator>Pete</dc:creator> <pubDate>Fri, 08 May 2009 11:58:25 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=16#comment-488</guid> <description>Hi Lincoln,I have incorporated Ocpsoft&#039;s &quot;prettyfaces&quot; into my application and am very enjoying &quot;pretty&quot; names in the address bar. However, I&#039;m finding issues with Spring Security via LoginBean, as above. After j_spring_security_check, the forward is to the unprettyfaced resource which appears distastefully in the address bar ;-(Do you have any ideas how to forward to the &quot;pretty&quot; name?Also, I use a prettylink to a Spring secured resource and include a request parameter, this is not forwarded on after the j_spring_security_check.I do very much like prettyfaces though and love the flexibility it gives. Would be great to have a solution to fully include Spring Security.Cheers,
PetePS code uploaded to same url as before ;-)</description> <content:encoded><![CDATA[<p>Hi Lincoln,</p><p>I have incorporated Ocpsoft&#8217;s &#8220;prettyfaces&#8221; into my application and am very enjoying &#8220;pretty&#8221; names in the address bar. However, I&#8217;m finding issues with Spring Security via LoginBean, as above. After j_spring_security_check, the forward is to the unprettyfaced resource which appears distastefully in the address bar ;-(</p><p>Do you have any ideas how to forward to the &#8220;pretty&#8221; name?</p><p>Also, I use a prettylink to a Spring secured resource and include a request parameter, this is not forwarded on after the j_spring_security_check.</p><p>I do very much like prettyfaces though and love the flexibility it gives. Would be great to have a solution to fully include Spring Security.</p><p>Cheers,<br
/> Pete</p><p>PS code uploaded to same url as before <img
src='http://ocpsoft.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: john</title><link>http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/comment-page-2/#comment-384</link> <dc:creator>john</dc:creator> <pubDate>Tue, 05 May 2009 05:16:02 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=16#comment-384</guid> <description>Derek, what IDE do you use? I want to learn spring framework with the spring security. I don&#039;t know what environment to use. Can you help me with that please?</description> <content:encoded><![CDATA[<p>Derek, what IDE do you use? I want to learn spring framework with the spring security. I don&#8217;t know what environment to use. Can you help me with that please?</p> ]]></content:encoded> </item> <item><title>By: Derek</title><link>http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/comment-page-2/#comment-382</link> <dc:creator>Derek</dc:creator> <pubDate>Tue, 05 May 2009 04:05:28 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=16#comment-382</guid> <description>John we don&#039;t used Netbeans, but I would imagine that you could check under WEB-INB/Lib(raries) and see if you see a jar called spring-security.  If you do then you have it.  If not go here: http://sourceforge.net/project/showfiles.php?group_id=73357&amp;package_id=270072&amp;release_id=630203The zip file is just an example Eclipse project using Acegi / Spring Security.  You can copy the contents of the zip file into a sample project and try and run it.</description> <content:encoded><![CDATA[<p>John we don&#8217;t used Netbeans, but I would imagine that you could check under WEB-INB/Lib(raries) and see if you see a jar called spring-security.  If you do then you have it.  If not go here: <a
href="http://sourceforge.net/project/showfiles.php?group_id=73357&#038;package_id=270072&#038;release_id=630203" rel="nofollow">http://sourceforge.net/project/showfiles.php?group_id=73357&#038;package_id=270072&#038;release_id=630203</a></p><p>The zip file is just an example Eclipse project using Acegi / Spring Security.  You can copy the contents of the zip file into a sample project and try and run it.</p> ]]></content:encoded> </item> <item><title>By: john</title><link>http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/comment-page-2/#comment-373</link> <dc:creator>john</dc:creator> <pubDate>Mon, 04 May 2009 23:00:53 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=16#comment-373</guid> <description>I was wondering if you could tell me how to add Sp. Sec. to my NetBnzz apps. I&#039;ve downloaded the zip, but is there a way to add it as a plug in or something. I would really appreciate it. If I can&#039;t use it in NetBnzz what IDE should I use. Thanks</description> <content:encoded><![CDATA[<p>I was wondering if you could tell me how to add Sp. Sec. to my NetBnzz apps. I&#8217;ve downloaded the zip, but is there a way to add it as a plug in or something. I would really appreciate it. If I can&#8217;t use it in NetBnzz what IDE should I use. Thanks</p> ]]></content:encoded> </item> <item><title>By: john</title><link>http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/comment-page-2/#comment-351</link> <dc:creator>john</dc:creator> <pubDate>Mon, 04 May 2009 06:26:11 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=16#comment-351</guid> <description>Hey guys,I&#039;m trying to use spring security in my applications, but I don&#039;t know how to add the libraries.I&#039;m using NetBeans 6.5, and I have the Spring MVC 2.5 plug in. Does this plug in come with Spring Security?Could you please help me so that I can use Spring MVC and Security in Netbeans 6.5.
Thank you.</description> <content:encoded><![CDATA[<p>Hey guys,</p><p>I&#8217;m trying to use spring security in my applications, but I don&#8217;t know how to add the libraries.</p><p>I&#8217;m using NetBeans 6.5, and I have the Spring MVC 2.5 plug in. Does this plug in come with Spring Security?</p><p>Could you please help me so that I can use Spring MVC and Security in Netbeans 6.5.<br
/> Thank you.</p> ]]></content:encoded> </item> <item><title>By: Revisited - Acegi/Spring Security &#38; JSF Login Page &#124; OcpSoft</title><link>http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/comment-page-1/#comment-271</link> <dc:creator>Revisited - Acegi/Spring Security &#38; JSF Login Page &#124; OcpSoft</dc:creator> <pubDate>Mon, 27 Apr 2009 22:00:13 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=16#comment-271</guid> <description>[...] correction has been made to the post: http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/, fixing an issue where FacesMessages were not being displayed on failed [...]</description> <content:encoded><![CDATA[<p>[...] correction has been made to the post: <a
href="http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/" rel="nofollow">http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/</a>, fixing an issue where FacesMessages were not being displayed on failed [...]</p> ]]></content:encoded> </item> <item><title>By: Lincoln</title><link>http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/comment-page-1/#comment-270</link> <dc:creator>Lincoln</dc:creator> <pubDate>Mon, 27 Apr 2009 21:43:40 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=16#comment-270</guid> <description>Ok... you are very correct. My fault.@PostConstruct occurrs too early in the Faces/Spring lifecycle, and at the point when the bean is constructed, the  BadCredentialsException has not yet been created.Move the handleErrorMessage() method to a PhaseListener, like so:package uk.co.pkit.project.view.bean.login;import javax.faces.context.FacesContext;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;import org.springframework.security.BadCredentialsException;
import org.springframework.security.ui.AbstractProcessingFilter;import uk.co.pkit.project.view.util.FacesUtils;public class LoginErrorPhaseListener implements PhaseListener
{
private static final long serialVersionUID = -1216620620302322995L;@Override
public void beforePhase(final PhaseEvent arg0)
{
Exception e = (Exception) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(
AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY);if (e instanceof BadCredentialsException)
{
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(
AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY, null);
FacesUtils.addErrorMessage(&quot;Username or password not valid.&quot;);
}
}@Override
public void afterPhase(final PhaseEvent arg0)
{}@Override
public PhaseId getPhaseId()
{
return PhaseId.RENDER_RESPONSE;
}}</description> <content:encoded><![CDATA[<p>Ok&#8230; you are very correct. My fault.</p><p>@PostConstruct occurrs too early in the Faces/Spring lifecycle, and at the point when the bean is constructed, the  BadCredentialsException has not yet been created.</p><p>Move the handleErrorMessage() method to a PhaseListener, like so:</p><p>package uk.co.pkit.project.view.bean.login;</p><p>import javax.faces.context.FacesContext;<br
/> import javax.faces.event.PhaseEvent;<br
/> import javax.faces.event.PhaseId;<br
/> import javax.faces.event.PhaseListener;</p><p>import org.springframework.security.BadCredentialsException;<br
/> import org.springframework.security.ui.AbstractProcessingFilter;</p><p>import uk.co.pkit.project.view.util.FacesUtils;</p><p>public class LoginErrorPhaseListener implements PhaseListener<br
/> {<br
/> private static final long serialVersionUID = -1216620620302322995L;</p><p> @Override<br
/> public void beforePhase(final PhaseEvent arg0)<br
/> {<br
/> Exception e = (Exception) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(<br
/> AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY);</p><p> if (e instanceof BadCredentialsException)<br
/> {<br
/> FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(<br
/> AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY, null);<br
/> FacesUtils.addErrorMessage(&#8220;Username or password not valid.&#8221;);<br
/> }<br
/> }</p><p> @Override<br
/> public void afterPhase(final PhaseEvent arg0)<br
/> {}</p><p> @Override<br
/> public PhaseId getPhaseId()<br
/> {<br
/> return PhaseId.RENDER_RESPONSE;<br
/> }</p><p>}</p> ]]></content:encoded> </item> <item><title>By: Lincoln</title><link>http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/comment-page-1/#comment-266</link> <dc:creator>Lincoln</dc:creator> <pubDate>Tue, 21 Apr 2009 21:49:32 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=16#comment-266</guid> <description>I wish I could help you two. I can&#039;t reproduce this problem. Everything is working fine for us. Perhaps you could send a WAR file / sources to reproduce the issue? I&#039;d be glad to take a look.</description> <content:encoded><![CDATA[<p>I wish I could help you two. I can&#8217;t reproduce this problem. Everything is working fine for us. Perhaps you could send a WAR file / sources to reproduce the issue? I&#8217;d be glad to take a look.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Served from: apache2-blow.brewers.dreamhost.com @ 2010-03-14 03:48:28 by W3 Total Cache -->