*
The moose likes Servlets and the fly likes Applet will  Post in IE but not in Netscape Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Applet will  Post in IE but not in Netscape" Watch "Applet will  Post in IE but not in Netscape" New topic
Author

Applet will Post in IE but not in Netscape

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4340
    
    2

My Applet does a Get then a Post. It works fine in IE but wont Post in Netscape. The value of balance in the session doesnt get changed.
Applet code:

the Servlet code:

I added the line
con.setAllowUserInteraction(false);
to the applet but no difference
I have Netscape 4.7 but the applet is entirely java 1.
If someone else has perhaps a newer version would visit my site and see if it works for them?
http://javaguy.yi.org
the applet is on the 5th page.
after you hit quit, buy something and see if you got paid for the quiz.
Oh by the way, pick easy quiz(trust me)

[This message has been edited by Randall Twede (edited February 13, 2001).]


SCJP
Visit my download page
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Randy,
Your cookie logic is kind of impolite. I signed on to your site at home this week-end. Now I am at work and I tried to sign in. Since I don't have the cookie here it didn't recognize me. When I tried to use my user name I get a message that that name is already in use.
Well, I have two offices and a home computer, as well as off-site access on occasion. Just how many user names do you think that I want to remember???
Perhaps you need a password with the user name. The cookie can remember both. Then when I am at a different machine-if I know the password for the username you can make me another cookie for this machine. (Please ).
How else will I ever order those spells???

"JavaRanch, where the deer and the Certified play" - David O'Meara
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4340
    
    2

Cindy,
You have a point so I will explain why it is that way.
In the beginning there was the cookie. Then Randy said let there be a Magic Shop
The cookie servlet was the first servlet I wrote. The whole site was as much learning experience as anything. I didnt think a password was necessary. I thought it was better that return visitors dont have to type anything, just click a button. Login is not a security thing it is so I can keep track of visitors. Even when the wizard asks your name again you dont have to type anything(although that is a little known fact and an inside joke) it gets your name from the cookie if you dont enter a different one.
Even I have two user names. one for IE and one for Netscape.
So the thing is you dont have to remember your login name at all. When you return you just click the login button
[This message has been edited by Randall Twede (edited February 13, 2001).]
Brett Knapik
Ranch Hand

Joined: Oct 15, 2000
Posts: 255
Well what happens if the user deletes the cookie? Do they lose their account permanatly? I clean out my cookies once every 2 weeks so if thats the case you might want to change that.
------------------
I wish there was a button on my monitor to turn up the intellegince.
Theres a button called 'brightness' but it doesn't work


"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4340
    
    2

Brett,
Now that is a problem. If someone deletes their cookies they have to choose a new name next time. Or if they ask I can delete the name from the user list so they can get it again(this option is only available to people I know). I might worry about that after I figure out why the applet only works in IE. I dont really like it that visitors have to accept cookies in the first place. If it was a real store I sure wouldnt want to turn away customers because my software doesnt like their browser settings.

[This message has been edited by Randall Twede (edited February 13, 2001).]
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi Randall,
I tried the Applet using NN 4.73 and the count for the gold pieces turned up ok. Time to upgrade your browser
Jane


Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4340
    
    2

Jane,
That is good news! I have Netscape 4.7 for some reason it doesnt work for me. Maybe I should remove the disclaimer then.
Or change the wording at least.
[This message has been edited by Randall Twede (edited February 13, 2001).]
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4340
    
    2

Jane,
Did you tell the wizard your name was Moe? There is no record of a sale to Jane in the database. The applet will say the right balance, but did you actually put something in your shopping cart? The problem was that the balance was not getting changed in the session.
Victor Boveda
Greenhorn

Joined: May 22, 2001
Posts: 6
Try this. I've found than Netscape doesn't wait for the OutputStream to send data before closing it. So you should force it to wait.
Applet code:

Servlet code:

Hope this helps

[This message has been edited by Victor Boveda (edited May 31, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet will Post in IE but not in Netscape