Trying to display text+xml content as plain/text

Discussion in 'Internet Explorer' started by Roy, Oct 6, 2006.

  1. Roy

    Roy Guest

    I have a Java servlet that returns a string that contains a text line, and
    then an xml document:

    My Text line
    <?xml version="1.0" encoding="UTF-8"?>

    I am using response.setContentType("text/plain"); so FireFox displays the
    page as just plain text (my desired behavior), but IE6 reports an error:

    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then
    click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource
    'http://myserver:8080/myfolder/srv/myTest'. Line 1, ...

    My Text line

    Any ideas how I can make IE display the result as a regular text and not try
    to invoke a style sheet?
    Roy, Oct 6, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.