• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet runs twice if I use IE 5.5

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic