-
1. Re: Removing the NotLoggedInException
nickarls Mar 4, 2008 8:20 AM (in response to mbakkali)Do you have a
<exception class="org.jboss.seam.security.NotLoggedInException"> ... </exception>
in pages.xml?
-
2. Re: Removing the NotLoggedInException
shane.bryzak Mar 4, 2008 9:30 AM (in response to mbakkali)If you want to change the log level:
<exception class="org.jboss.seam.security.NotLoggedInException" logLevel="info"> </exception>
If you want to suppress all logging of the exception:
<exception class="org.jboss.seam.security.NotLoggedInException" log="false"> </exception>
-
3. Re: Removing the NotLoggedInException
mbakkali Mar 4, 2008 6:52 PM (in response to mbakkali)I do have that in pages.xml
However I tried to use logLevel and log: none of them work.
Also Eclipse shows me an error when I try to add
logLevel
orlog
in pages.xmlI use Seam-2.0.1.GA.
Is this a new feature in 2.1.0.A1 ?
-
4. Re: Removing the NotLoggedInException
keithnaas Mar 4, 2008 7:22 PM (in response to mbakkali)Mounir,
Try
severity
. Looking at the source where this is initialized in Exceptions.java that seems to be the attribute name.<exception class="org.jboss.seam.security.NotLoggedInException" severity="info"> </exception>
-
5. Re: Removing the NotLoggedInException
mbakkali Mar 4, 2008 8:23 PM (in response to mbakkali)I tried to add the severity=
info
as you mentioned (at the tagexception
) but it did not work and Eclipse showed me an error.The only place where you can add the attribute
severity
is under
themessage
tag underredirect
(which is underexception
).<exception class=org.jboss.seam.security.NotLoggedInException > <redirect view-id=/login.xhtml> <message severity=INFO> ... </message> </redirect> </exception>
However, this did not work also.
I checked the notes for the 2.0.1.A1 version and it seems
like that this may this is a bug that may get fixed soon:I tried to add the severity="info" as you mentioned (at the tag
exception
) but it did not work and Eclipse showed me an error.The only place where you can add the attribute
severity
is at themessage
tag underredirect
(which is underexception
).
I don't know what this does and I triedINFO
,WARN
,ERROR
but did not notice any changes in there, neither on the UI part.I found the following on the notes about the 2.0.A1 version and this bug may get fixed soon:
* [JBSEAM-1021] - Don't log exceptions if they are handled in pages.xml
Any idea?
-
6. Re: Removing the NotLoggedInException
keithnaas Mar 4, 2008 9:41 PM (in response to mbakkali)Mounir,
Another possibility to get it to go away is to circumvent the NotLoggedInException.
Try using the login-required attribute on the page urls that need protected. I believe that this doesn't cause a NotLoggedInExceptoin to be thrown. Instead it redirects to the pages login-view-id.
<pages login-view-id="/unprotected/login.jsf"> <page view-id="/protected/*" login-required="true" /> </pages>
Keith
-
7. Re: Removing the NotLoggedInException
mbakkali Mar 4, 2008 10:11 PM (in response to mbakkali)Hey Keith,
That did the trick!
I just added the
login-view-id
attribute and it does not log any NotLoggedInException anymore.Thanks a lot!
Mounir
-
8. Re: Removing the NotLoggedInException
shane.bryzak Mar 5, 2008 12:45 AM (in response to mbakkali)
Mounir Bakkali wrote on Mar 04, 2008 06:52 PM:
I do have that in pages.xml
However I tried to use logLevel and log: none of them work.
Also Eclipse shows me an error when I try to addlogLevel
orlog
in pages.xml
I use Seam-2.0.1.GA.
Is this a new feature in 2.1.0.A1 ?Apologies, it is a 2.1.0 feature. This will work in the latest SVN version of Seam.