<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Logging out a Web User</TITLE>
<META content="MSHTML 6.00.2900.2769" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
BEHAVIOR: url(#default#VML)
}
o\:* {
BEHAVIOR: url(#default#VML)
}
w\:* {
BEHAVIOR: url(#default#VML)
}
.shape {
BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: Arial
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: Arial
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: Arial
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: #606420; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: #606420; TEXT-DECORATION: underline
}
P {
FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: Arial; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle19 {
COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=#606420 link=blue>
<DIV><SPAN class=317183621-26102005><FONT face=Arial color=#0000ff size=2>Hi
Jason,</FONT></SPAN></DIV>
<DIV><SPAN class=317183621-26102005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=317183621-26102005><FONT face=Arial color=#0000ff size=2>Yes,
that worked. Thank you very much.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org]<B>On
Behalf Of </B>Jason Trump<BR><B>Sent:</B> Wednesday, October 19, 2005 3:43
PM<BR><B>To:</B> The OpenCms mailing list<BR><B>Subject:</B> RE: [opencms-dev]
Logging out a Web User<BR><BR></FONT></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy">How about
request.getSession().invalidate()? You’ll have to reauthenticate as
Guest on the next request.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy"><o:p> </o:p></SPAN></FONT></P>
<DIV
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: blue 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
<DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT face=Arial
size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=3>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">
opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org]
<B><SPAN style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Brian
Jacobs<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday,
October 19, 2005 3:00 PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
opencms-dev@opencms.org<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [opencms-dev] Logging out a Web
User</SPAN></FONT><o:p></o:p></P></DIV>
<P class=MsoNormal><FONT face=Arial size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt">Hi all,</SPAN></FONT>
<o:p></o:p></P>
<P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt">Thanks in advance for
any help you can give.</SPAN></FONT> <o:p></o:p></P>
<P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt">I'm having trouble
logging out a web user.</SPAN></FONT> <o:p></o:p></P>
<P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt">Logging
in:</SPAN></FONT> <BR> <FONT
size=2><SPAN style="FONT-SIZE: 10pt">cms.loginWebUser( username, password );
<-cms is a CmsObject</SPAN></FONT> <o:p></o:p></P>
<P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt">Logging out (by
logging back in as Guest):</SPAN></FONT>
<BR> <FONT size=2><SPAN
style="FONT-SIZE: 10pt">cms.loginUser( "Guest","");
<-cms is a
CmsObject</SPAN></FONT> <o:p></o:p></P>
<P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt">Determining who the
user is:</SPAN></FONT> <BR> <FONT
size=2><SPAN style="FONT-SIZE: 10pt">String currentUser = cmsjsp.user( "name"
); <- cmsjsp is a CmsJspActionElement</SPAN></FONT>
<o:p></o:p></P>
<P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt">When I want to log
out (by logging the user back in as Guest), the cmsjsp.user("name") code
continues to return the old name of the web user, not
Guest.</SPAN></FONT><o:p></o:p></P>
<P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt">Until that point
things work as expected. First visiting the site, the user method returns
"Guest", after logging in it returns the name of the web user. Just after
logging in again as Guest do things go wrong.</SPAN></FONT><o:p></o:p></P>
<P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt">Is there a different
way I should log out a web user? I didn't find out in the API.</SPAN></FONT>
<o:p></o:p></P>
<P class=MsoNormal><FONT face=Arial size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt">Regards,</SPAN></FONT>
<BR> <FONT size=2><SPAN
style="FONT-SIZE: 10pt">Brian Jacobs</SPAN></FONT>
<BR> <FONT size=2><SPAN
style="FONT-SIZE: 10pt">Purple Monkey Studios</SPAN></FONT>
<o:p></o:p></P></DIV></DIV></BLOCKQUOTE></BODY></HTML>