GeeCON Prague 2014*
The moose likes JSP and the fly likes why Internet Explorer is different than other browsers in jsp? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "why Internet Explorer is different than other browsers in jsp?" Watch "why Internet Explorer is different than other browsers in jsp?" New topic
Author

why Internet Explorer is different than other browsers in jsp?

alsoumahi alBatal
Ranch Hand

Joined: Nov 22, 2009
Posts: 94
Hi experts , I am having small application which consists of login page , action page and log out page. if login correct it shows the name of user in action page , then if user click logout button he goes directly to logout page. The thing is I use session with new login and invalidate this session once user click logout Button. okey now if I have following scenario :

user log in at index page , go to action page , his name appears there , clicks logout button, end session(invalidate session) , redirects user to index page for another new login

and I use this scenario in Internet Explore whatever version is , I got the previous name (old name) for new second login (and that is should not be )within same application why is that . it needs me to close the application after logout and open it again for new login to show the new name in the action page.

if I use this scenario in FireFox or google chroom , no need to close application and open it in new window , once user is redirected again to index page he can login and new name(his name) will appear in action page( that is the correct way)

this is the code for logOut servlet:


in my login servlet , I did this:



I make sure that my index does not contain any session using : <%@ page session="false"%>

my question why is working as perfect with Mozilla and chroom but not with IE , why do I need to close the application after logout and open it again for new login.

this was my first try , then in my second try I decided I will not use session any more , i decide to create simple text file to store the current user name, so in my login servlet will be like this:



in action page I am reading the text name in the current.txt I made it during login process and show the name .

if i use this , still the same in IE , it shows old name for new login instead of new name , although I am reading from text file.

chroom and mozilla works fine , why the problem only with IE. I really hate it...
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What is that "break" and system.exit doing in there?! And... Wow, that's wide source.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

Please reformat your source to use conventional indentation and avoid stretching the browser document so wide. Otherwise people are likely to just skip this post as too hard to read.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

System.exit()? Are you kidding me?
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

alsoumahi alBatal wrote:chroom and mozilla works fine , why the problem only with IE. I really hate it.


This the first time you tried to do something complex in assorted browsers? IE has never followed the "standard", Microsoft just does what it wants. There is a chance that IE 9 may actually be mostly standards compliant. Sadly, some projects still have to "support" IE 6, which has been causing developers to pull out their hair for ages.

And as others have said, your code is too ugly to look at carefully. I didn't even try to read it.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9303
    
  17

Cross Post...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
GeeCON Prague 2014
 
subject: why Internet Explorer is different than other browsers in jsp?