Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why Internet Explorer is different than other browsers in jsp?

 
alsoumahi alBatal
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is that "break" and system.exit doing in there?! And... Wow, that's wide source.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
System.exit()? Are you kidding me?
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9528
32
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cross Post...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic