Hi, Billy
So, you did check that there were two method calls like I sugested. As you
didn't post your code, we will have to guess again. Does your servlet
expects parameters? If it does, did you check if the second request included
exactly the same parameters as the first one? You might also check the
headers for the two calls. As you didn't say if you have taken in account my
first suggestion, I still suspect that you are using on the client side
something that repeat the request. (I suspect this just because it is the
way Adobe programmers think things are to be done with their plug-ins.)
Pierre-Yves
-----Message d'origine-----
De : A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]De la part de
Graham, Billy
Envoy� : mercredi 19 septembre 2001 16:50
� : [EMAIL PROTECTED]
Objet : Re: Inconsistent behaviour in Servlet output
Believe me I've tried!
That's why I'm hunting for any suggestions.
I've been programming (intermediate level since 1978! - yes there were
computers way back then too!) for a long number of years, though not in
java, and have never come across a situation like this that I couldn't solve
after bug-searching - I am therefore putting it down to something 'peculiar'
to java/servlet/server programming that I can't quite grasp yet.
I was hoping some of you more experienced java masters might have seen this
problem frequently and said something like ...
"You doughball Billy, try X, Y and Z because that's how I cured it!".
I wait in anticipation - I just know someone has had this 'bug' before.
Best regards, Billy Graham
-----Original Message-----
From: Pierre-Yves Saumont [mailto:[EMAIL PROTECTED]]
Sent: 19 September 2001 15:36
To: [EMAIL PROTECTED]
Subject: Re: Inconsistent behaviour in Servlet output
Hi, Billy,
When you ask a question, you should read the answers (although they
sometimes contains mistakes like telling you to make your method protected).
You didn't solve your problem. You only found a workaround. You should
search why synchronizing your method apparently solves the problem. When you
find this, you should try to rewrite it in such a way that synchronizing the
method would not be needed.
Pierre-Yves
-----Message d'origine-----
De : A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]De la part de
Graham, Billy
Envoy� : mercredi 19 septembre 2001 11:24
� : [EMAIL PROTECTED]
Objet : Re: Inconsistent behaviour in Servlet output
Thanks to all!
As requested by a few people, I was just about to send a sample of my
'dodgy' code when I read an e-mail suggesting I use a 'Protected' doGet()
method. I tried this but it didn't work - however it did remind me about the
'Synchronized' keyword (as I stated earlier, I am new to java but have read
extensively on it - so somewhere in the basement of my brain the facts are
there). I made the doGet() method both Synchronized and Protected and Hey
Presto! everything works - no more dodgy variables. I still don't quite
understand what was changing the variables as there was only one request
being made to the server for the servlet, though as I outlined in an earlier
e-mail the server feedback seemed to indicate there were 2 Get() requests
being made. Anyway - it's working A OK now, so I'm off for a coffee!
Many thanks for all the contributions.
Best Regards, Billy Graham.
___________________________________________________________________________
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