It would help if you send relevant snippets of the servlet and applet code.
Understanding from what you have said, it probably looks like an applet
lifetime related problem, becoz' of which your servlet gets invoked twice.
Inside which method of the Applet are you invoking the servlet? Search for
your bug thier.

Regards
Sanjeev

-----Original Message-----
From: bin cai [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 27, 2002 1:53 AM
To: [EMAIL PROTECTED]
Subject: Why the servlet is called two times


Hi,
currently i am encountering such problem. I guess it
is caused by applet and servlet.
I wrote two servlet calss called Retrieve.java and
showInfo.java.
In Retrieve.java, the sytem get information from
database and put the info in session. then invoke
ShowInfo.java by
response.sendRedirect("/root/servlet/ShowInfo"). These
are simple and works well.
But when i embed these two servlets into java applet,
it works rare.
in applet i have JeditorPanel which is associate with
Retrieve.java. when applet is loaded, the
Retrieve.java is invoked and then invoke
ShowInfo.java. but the problem is the ShowInfo.java is
invoked two times and the session is invalidated.
So the following sevelet class can't get parameters
from session.
I spend a lot of time trying to find the bug. just
failed.any one can help me out, really appreciate
bin

______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to