Hi Aby,
Thanks for the reply. I suppose I should have explained that the user
has the option to return to the project (via another button) and
therefore a removeUserSession() in the this_OnBeforeHTMLOutputEvent
probably isn't applicable.
Our original code was: (still on ND3 event model)
public int onContinueWebEvent( String args[] )
{
// Terminate the user session and jump to the HP connect
// Logon screen.
int command = PROCEED_WITH_BUILTIN_HANDLING;
CSpButton myHelp = (CSpButton) getDisplayField ("btExit");
myHelp.setActionType(CSpCommand.GO_TO_EXTERNAL_URL_ACTION_TYPE);
try
{
String HPLogoutURL =
CSpider.getUserSessionObject("HPLogoutURL").toString();
myHelp.setExternalURL (new URL(HPLogoutURL));
}
catch (MalformedURLException ex)
{
CSpLog.send(this, CSpLog.ERROR, "pgLogOut,
MalformedURLException for Logout");
}
myHelp.setSendSessionToExternalURL (true);
command = doAction(args);
try
{
CSpider.removeUserSession();
}
catch (Exception ex)
{
CSpLog.exception(this, "removeSessionId", ex);
}
return(command);
}
//]]SPIDER_EVENT<onContinueWebEvent>
We changed the CSpider.removeUserSession() with the following two
commands. It seems to work:
CSpSession currSession = CSpider.getUserSession();
currSession.removeAll();
The concern I have is is this the correct way to clean up after ourselves!
Thanks,
Damian
______________________________ Reply Separator _________________________________
Subject: Re: [ND] Can't execute RemoveUserSession in ND4 on logout
Author: Non-HP-Aby.Mathew ([EMAIL PROTECTED]) at HP-Ireland,mimegw1
Date: 6/30/99 5:19 PM
Damian,
I would be a little surprised if removeUserSession() fails in the
this_OnBeforeHTMLOutputEvent. Could you show us your code?
Aby
> -----Original Message-----
> From: DAMIAN_O\'[EMAIL PROTECTED]
> [SMTP:DAMIAN_O\'[EMAIL PROTECTED]]
> Sent: Wednesday, June 30, 1999 11:09 AM
> To: [EMAIL PROTECTED]
> Subject: [ND] Can't execute RemoveUserSession in ND4 on logout
>
> Hi,
>
> We moved from ND3 to ND4 recently and have come across a number of
> problems. One such problems relates to CSpider.removeUserSession().
>
> On a logout page we call an external URL (from a button webevent that
>
> runs a script to disconnect the user from the database (this is
> inside
> our firewall). Upon returning to our project a call is made to
> CSpider.removeUserSession() with drastic results.
>
> ** The HTML error we see is -
> A severe application error occurred. Please notify the System
> Administrator immediately!
>
> Note to the developer: An un-caught Exception has probably occurred
> in
> one of the events that have been implemented on the Project class.
>
> ** The Log error we see is -
>
> spider.control.CSpWebEventProcessor:c:930674037927:w:930674042786:crea
> teDefaultSessionEnvironment: Creating a default Session environment
> as
> a way to recover
>
>
>
> I've seen the other suggestions in the forums (move call to the
> OnBeforeHTMLOutput event etc.) We have tried this we no success. If
> anybody can help or suggest an alternative method for cleaning up a
> user session it would be appreciated.
>
> Regards,
> Damian O'Connor
> Senior Software Development Engineer
> Hewlett Packard International Bank
>
> _________________________________________________________________________
>
> For help in using, subscribing, and unsubscribing to the discussion
> forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>
> For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]