It's all about the answers!

Ask a question

HTML Build artifact opens as text


James Palmer (3349) | asked Mar 08 '12, 10:06 a.m.
Using RTC 3.0.1.
During my build (using the build engine and an Ant build definition), I create an HTML file. Using Ant (artifactFilePublisher w/ property contentType set to text/html) I publish this HTML file to Downloads tab of my build. The file is there, but when I click on it, it opens it as text. How do I get it to open as HTML in the web browser instead?

The file is in my Navigation window, and it opens in the browser fine. (to get that to happen, I needed to add the META tag w/ content type set to text/html before it would... it was opening as text until adding that tag at the top)...

I'm sure I'm missing something!
Here is a sample of what my output.html file contains (very basic html):
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-5">
<html><body><table border=1>
<tr><th>lang</th>
<th>SLOC</th>
<th>code</th>
<th>data</th>
<th>dir</th>
<th>comment</th>
<th>total</th>
<th>file</th></tr>
</table></body></html>


Here is my artifactFilePublisher:
<artifactFilePublisher repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}"
buildResultUUID="${buildResultUUID}"
filePath="output.html"
contentType="text/html"
label="HTML output" />

One answer



permanent link
James Palmer (3349) | answered Mar 08 '12, 10:36 a.m.
I'm trying to open this in Eclipse... with the web client, it seems to work fine... but on Eclipse, I get the behavior described above.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.