Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hyperlink html opening as save as instead of opening in IE

 
kamesh aru
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • 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
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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 Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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 Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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 Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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 Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic