[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
LogOff  XML
Forum Index -> Development
Author Message
dstrigel

Power User

Joined: 09/12/2010 09:23:42
Messages: 69
Offline

Hello!

We have tried to implement a Log Off Button. Like in the Demo Workplace...

Code:
  public void onButtonPressedLogOff( ActionEvent ae )
     {
         getWorkpageContainer().closeAllWorkpages( false, new Runnable()
         {
             public void run()
             {
                 HttpSessionAccess.getCurrentHttpSession().invalidate();
             }
         } );
     }
 


After pressing this button a error page is shown. Server Side Error

Code:
 java.io.IOException: Server returned HTTP response code: 500 for URL: <a href="http://localhost:8080/antos-1.0/faces/jsp/workplace/surroundingpage.jsp;jsessionid=a159facae14cd3af0c38da63cd9e" target="_blank" rel="nofollow">http://localhost:8080/antos-1.0/faces/jsp/workplace/surroundingpage.jsp;jsessionid=a159facae14cd3af0c38da63cd9e</a>
 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
 	at org.eclnt.client.comm.http.DataTransfer.transferXML(DataTransfer.java:692)
 	at org.eclnt.client.comm.http.DataTransfer.communicateToServerSynchronous(DataTransfer.java:217)
 	at org.eclnt.client.page.Page.transferDataRun(Page.java:1021)
 


Does someone have an idea what could be wrong?
Kind regards,
Daniel
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

...will check.

I remeber, that you are using Glassfish. We'll test with the most current version, if you have a specific version that you prefer, pls tell us.

Regards, Björn

Björn Müller, CaptainCasa GmbH
dstrigel

Power User

Joined: 09/12/2010 09:23:42
Messages: 69
Offline

current version is fine...

Regards,
Daniel
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

Hi,

for whatever reason, Glassfish does remove all http-response-header parameters for the response, in which the session was invalidated!!! One of them "eclnt-reload" is indicating to the client to internally re-start with a new session.

This seems to be a Glassfish Bug.
We'll check if we can do a bypass on our side...

Regards, Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

Hi,

end of analysis: it's not the response header parameters that are missing - it's the whole response that is returned as 500-repsonse.

Björn

Code:
 Glassfish:
 HTTP/1.1 500 Internal Server Error
 eclnt-reload: true
 Content-Encoding: gzip
 Content-Length: 236
 
 Tomcat:
 HTTP/1.1 200 OK
 Server: Apache-Coyote/1.1
 X-Powered-By: JSF/2.0
 Set-Cookie: JSESSIONID=9A7B15EB755C2B4E6A902514F506AB09; Path=/demos; HttpOnly
 eclnt-reload: true
 Content-Encoding: gzip
 Content-Type: text/html;charset=UTF-8
 

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

...and the end of the story is: we now check returned header parameters also in the error case ("500") on client side.

Or, in short words: it now works, also with Glassfish... - the change is part of the next regluar update, or earlier on your request.

Thanks for your input +
Regards! Björn

Björn Müller, CaptainCasa GmbH
dstrigel

Power User

Joined: 09/12/2010 09:23:42
Messages: 69
Offline

Thanks for the quick solution!
Regards,
Daniel
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team