tag:blogger.com,1999:blog-2441346846502137640.post6481716618844395540..comments2022-03-25T19:47:43.678-07:00Comments on Laâbidi Raissi blog: JSF 2, Spring Security integration with Remember-Me (Contd.)Laabidi Raissihttp://www.blogger.com/profile/08451854179058499942noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-2441346846502137640.post-87188499521341266392013-08-30T18:59:27.774-07:002013-08-30T18:59:27.774-07:00Ok, sorry for being this late. I have been very bu...Ok, sorry for being this late. I have been very busy at work. Anyway, I really can't tell about the real cause of this exception unless you give full stack.<br />However, my first guess is about your EL version (may be you are using Tomcat6 ?) Laabidi Raissihttps://www.blogger.com/profile/08451854179058499942noreply@blogger.comtag:blogger.com,1999:blog-2441346846502137640.post-38715435284577761182013-08-29T06:38:51.017-07:002013-08-29T06:38:51.017-07:00Ok, I will see it later today and try to solve you...Ok, I will see it later today and try to solve your problem, I am kind of busy nowLaabidi Raissihttps://www.blogger.com/profile/08451854179058499942noreply@blogger.comtag:blogger.com,1999:blog-2441346846502137640.post-667328749304425672013-08-29T06:38:25.627-07:002013-08-29T06:38:25.627-07:00This comment has been removed by the author.Laabidi Raissihttps://www.blogger.com/profile/08451854179058499942noreply@blogger.comtag:blogger.com,1999:blog-2441346846502137640.post-52872797181143983152013-08-29T05:01:24.177-07:002013-08-29T05:01:24.177-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/00746669271991117404noreply@blogger.comtag:blogger.com,1999:blog-2441346846502137640.post-20200014704869470832013-08-27T00:58:32.539-07:002013-08-27T00:58:32.539-07:00Hi,
Thanks for the information.But when I try to l...Hi,<br />Thanks for the information.But when I try to login its giving me below exception:<br />/pages/user-profile.xhtml @22,75 rendered="#{loggedInUser.user.hasRole('ROLE_USER')}" Failed to parse the expression [#{loggedInUser.user.hasRole('ROLE_USER')}]Anonymoushttps://www.blogger.com/profile/00746669271991117404noreply@blogger.comtag:blogger.com,1999:blog-2441346846502137640.post-46465668115765123942013-08-26T13:10:58.359-07:002013-08-26T13:10:58.359-07:00Please let me know if you have problems understand...Please let me know if you have problems understanding special code parts,Laabidi Raissihttps://www.blogger.com/profile/08451854179058499942noreply@blogger.comtag:blogger.com,1999:blog-2441346846502137640.post-89933416616065751262013-08-26T13:08:00.266-07:002013-08-26T13:08:00.266-07:00Hi Narendar and welcome to my blog,
In the class B...Hi Narendar and welcome to my blog,<br />In the class BaseManagedBean (from which almost all my managed beans inherit) you can find a method named updateSecurityContext that calls a method from the injected ILoggedInUser bean, updateSecurityContext.<br />Now, in LoggedInUser managed bean (implementation for the ILoggedInUser interface), you can find the remember-me logic. <br />As for the check box, it's very easy to add a checkbox to your jsf login view and then test its value in the managed bean to decide whether or not to remember the userLaabidi Raissihttps://www.blogger.com/profile/08451854179058499942noreply@blogger.comtag:blogger.com,1999:blog-2441346846502137640.post-32889206259871531142013-08-26T04:28:12.688-07:002013-08-26T04:28:12.688-07:00Hi,
source code given,doesn't have updated cod...Hi,<br />source code given,doesn't have updated code(missed remember-me functionality check-box and managed Bean login method remember me functionality)Anonymoushttps://www.blogger.com/profile/00746669271991117404noreply@blogger.comtag:blogger.com,1999:blog-2441346846502137640.post-65136276291205245222013-08-26T04:24:57.541-07:002013-08-26T04:24:57.541-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/00746669271991117404noreply@blogger.comtag:blogger.com,1999:blog-2441346846502137640.post-327340620832555462013-08-15T16:01:51.498-07:002013-08-15T16:01:51.498-07:00I have the source code of all articles published h...I have the source code of all articles published here about JSF2 integration with Spring, Spring Security, Freemarker, etc..<br />It's available on Github under:<br />https://github.com/raissi/jsf2-spring-jpaLaabidi Raissihttps://www.blogger.com/profile/08451854179058499942noreply@blogger.comtag:blogger.com,1999:blog-2441346846502137640.post-22056932574282558012013-08-15T14:34:48.224-07:002013-08-15T14:34:48.224-07:00can you give me the source code ?can you give me the source code ?aldosuwandihttps://www.blogger.com/profile/00689292873787325595noreply@blogger.comtag:blogger.com,1999:blog-2441346846502137640.post-53796531996143554222013-07-20T07:08:46.924-07:002013-07-20T07:08:46.924-07:00Hi Arjan,
I really appreciate your comment. I tota...Hi Arjan,<br />I really appreciate your comment. I totally agree with you about this point. And I think using a scoped proxy of the LoggedInUser object is a best solution for it. Isn't it ?<br />I will update the article with modifications right now.<br />Again, thank you for your remark<br />http://static.springsource.org/spring/docs/3.0.x/reference/beans.html#beans-factory-scopes-other-injection<br />Laabidi Raissihttps://www.blogger.com/profile/08451854179058499942noreply@blogger.comtag:blogger.com,1999:blog-2441346846502137640.post-41168330265495899792013-07-20T03:02:04.915-07:002013-07-20T03:02:04.915-07:00Nice article, but I would think twice about manual...Nice article, but I would think twice about manually instantiating LoggedInUser and putting the result of that into the session directly. This will work with the given example, but will break as soon as LoggedInUser starts to use other (CDI) services, e.g. is injected itself with some beans and/or uses interceptors.<br /><br />With the code as given, sometimes LoggedInUser will be a proxy and sometimes it will not be one.<br /><br />I think you can better try to resolve the EL expression "loggedInUser" or inject the bean. It will always be non-null then. After that you can set the User if it's null.Arjan Tijmshttps://www.blogger.com/profile/08548593340781885396noreply@blogger.com