Java applet delete browsesr cookies

Hello.

I have java applet in my website. Sometimes I noticed that after my java applet is loaded - the client loses his cookies. it seamed that the Java applet deleting the cookies....

I am using MindTerm Java applet. Their support said that they not delete the browser cookies in their code.

This scenario disconnect the user from my website.
This problem only occur on Internet Explorer 6.


Cyber-EEAsked:
Who is Participating?
 
ee_autoConnect With a Mentor Commented:
Question PAQ'd, 500 points refunded, and stored in the solution database.
0
 
jazzIIIloveCommented:
Hi there;

so we are sure?

If you block the use of cookies on the web in general you need to allow it for your website:

Allow cookies in Internet Explorer:

1.      Tools [menu]
2.      Internet Options& [submenu]
3.      Privacy [tab]
4.      Sites& [button]
5.      Type "www.yoursite.com" and press Allow [button]
6.      OK until all dialog windows are closed

Allow JavaScript and Java in Internet Explorer:

1.      Tools [menu]
2.      Internet Options& [submenu]
3.      Security [tab]
4.      Internet [Web content zone]
5.      Custom Level& [button]
6.      Under section called "Scripting"
    a.      "Active scripting" set to Enable
    b.      "Scripting of Java applets" set to Enable
7.      Ok until all dialog windows are closed

Best regards...
0
 
Cyber-EEAuthor Commented:
All of the configurations are enabled.

The problem still occur....
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
samalrajCommented:
The following link may help
http://www.java.com/en/download/help/5000020300.xml

if you wanted to do by code then have a look at bellow snippet

Regards,
amalraj

 /*
       **  delete a cookie, set the expiration in the past
       */
 
 
       java.util.Calendar c = java.util.Calendar.getInstance();
       c.add(java.util.Calendar.MONTH, -1);
       String expires = "; expires=" + c.getTime().toString();
       JSObject myBrowser = JSObject.getWindow(this);
       JSObject myDocument =  (JSObject) myBrowser.getMember("document");
       myDocument.setMember("cookie", expires);

Open in new window

0
 
Cyber-EEAuthor Commented:
How is suppose to help me?

I don't want to delete the browser cookie.
I sure that the java applet isn't deleting any cookie.
0
 
samalrajCommented:
oops, sorry for that, how about this one
In IE 6, from the Tools menu, select Internet options. Click on the Privacy tab. Then click on the Advanced button
1. Check the Override automatic cookie handling box.
2. Click on the Accept radio buttons for First-party cookies and Third-party Cookies.
3. Check the Always allow session cookies box
4. Click OK twice
now try with your website and let me know if it works
0
 
Cyber-EEAuthor Commented:
I already do that...

Still not working....
0
 
Cyber-EEAuthor Commented:
Problem solved!!!!

My web application is written in asp.net.

My cookies defined as HttpOnly Mode.
cookie.HttpOnly = true;

This option disable the document.cookie access in client side under internet explorer.
I removed the HttpOnly limitation from my cookies and suddenly the java applet is working fine.

I don't know why IE6 is deleting the web application's cookies.

All the browsers including IE7 support this HttpOnly feature.

Haapy happy
Joy Joy
Erez!

thanks you all....
0
 
samalrajCommented:
Congratulation Cyber-EE,
                                    Today I add one more tip to my secret knowledge base, thank you for sharing it.
Happy programming,
:)
0
 
jazzIIIloveCommented:
Really happy for you and i appreciate your effort...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.