• Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet runs twice if I use IE 5.5

 
ram ragu
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
I am creating a pdf on the fly in my servlet but when I call my servlet from IE5.5 it calls the servlet twice
unfortunately my sevelt
updates a DB then it generates a report.. if it is
called twice there there will be two updates... I just
want to ask you experts is there any
know workaround for this particular problem.
I checked Microsoft website and they have the following article
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q293792
it says the following
RESOLUTION
To work around this limitation and to considerably
improve the performance of your application, watch for
the "contype" userAgent request and only return the
content-type.
but I really don't understand what that means..
in my servelt I have the following
response.setContentType("application/pdf")
is that what the above resolution is asking me to do
kindly help me!
Ram
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I guess it is asking you to do that. It's also saying it doesn't like a binary stream, which doesn't make sense to me - how can the browser tell how the server is serving the file?
Perhaps what it means is that the browser works better when the src attribute for the file ends with .pdf which you could easily fake with a servlet mapping in your web.xml.
Adam
 
ram ragu
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adam,
I just want to explain what they mean by bytestream..
if you create dynamic pdf( on the fly) you will be sending it as a bytestream in your serlet response, when you do this you can set the content type to application/pdf
the otherway is .. accessing a physical pdf file on the server on the server
I think that is what they mean.
Hope this helps!
Ram
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!