• 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

hyperlink html opening as save as instead of opening in IE

 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
using tomcat 6 html hyperlinks when clicked prompting open/save as /cancel dilaog box instead of opening in browser.
thanks in advance
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the code to your hyperlink?
 
kamesh aru
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
its a redirection to another page

title="Automated LMS notifications sent in error" href="http://localhost:8080/portal/server.pt/document/528/doc_to_open">;TEST DOC

the above line is opened with a and closed with a
open_dialog_box.JPG
[Thumbnail for open_dialog_box.JPG]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On the server side, how are you delivering this document?
Are you using requestDispatcher.forward?
Are you streaming the document?
Or, are you just adding the document name to the URL and letting Tomcat's default servlet stream it?

Is "doc_to_open" just something you added when posting here or was that part of an actual URL?


Does this same behavior occur with other browsers, like FireFox?
 
kamesh aru
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

doc_to_open = 20080103WC_01.html


This occurs in all browsers in firefox it downloads the file and opens it.

yes just adding the document name to the URL and letting Tomcat's default servlet stream it
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's odd.

Do you have either the LiveHttpHeaders or the FireBug plugin installed in Firefox?
If you do, can you look at the headers and see if the server is sending a Content-Type header?
If it is, what is its value?

 
kamesh aru
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes checked the http headers
content-disposition is attachment ... how to over ride it on the tomcat server any configuration we can make to change it to inline.. i suppose which might open it with out the dialog box.

 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not seeing this behavior in Tomcat 6 on my machine.
Can you try running this small application and see if the same behavior exists?
http://www.souther.us/att.war
If not, can you create a small application that reproduces this problem and make it available for download?



 
kamesh aru
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
following link helped in writing a filter to replace attachment with inline
servlet filter
thanks for the responces
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it were me, I'd track down the problem with the server before adding a filter to my project.
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
He possibly changed Tomcat´s default web.xml and/or override the mime mapping of HTML in the web.xml of his own webapp.
 
reply
    Bookmark Topic Watch Topic
  • New Topic