Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

content disposition header for static content

Status
Not open for further replies.

trifo

MIS
May 9, 2002
269
HU
Hi!

I am running a webapp under Tomcat 5.5 with Coyote HTTPConnector as a web server. I would need to serve some static content from this server: there is a servlet-generated html content, which is displayed on the client's browser. This html content embeds a link to a PDF document, something like this:

Code:
<A href="[URL unfurl="true"]http://service.myserver.com/service/tmp/generated_report.pdf"[/URL] > click to view report </A>

Firefox browser goves user the choice to open or save it, bit IE just tells that it is unable to display the page.

I found some clues on the topic which tells I should set the following http headers:

Code:
Content-disposition=attachement
Pragma public

But as the stream is not from a servlet, jus a generated html text, I did not found where to set what.

Tried to set various mime-types in the web.xml, but it had no effect.

Additional information: I am not the developer of the mentioned application, I just manage the environement for it. Thus there is a little arguement on whose job is to change someting to make this work.

Can you help me out of this?

--Trifo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top