File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Content-type question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Content-type question" Watch "Content-type question" New topic
Author

Content-type question

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 805
I put the content-type line at the top of my HTML page for text/html. The basic page I created with DreamWeaver MX. When I display in the browser the Content-type: text/html shows up. How come? I read the file in using Perl and spit the contents out directly and the page displays as should. Is there something I should know about DreamWeaver or can someone add some helpful insight into why this is occuring? Thanks.

Rob
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

From what you have written, I really have no idea what your issue is.

Are you saying that whatever means you are using to set the content-type is appearing as text?

How are you trying to accomplish this?
[ March 02, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 805
This is the code (minus the #'s) and it shows up regardless.

Content#-type: text#/html


#<#html>
#<#head>
#<#title>Untitled Document</title>
#<meta http#-equiv=#"#Content#-Type" content="#text#/html; charset=iso-8859-1">
#<#/head>

<body>

</body>
</html>
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 805
The HTML code is fine (displays as should) but Content-type: text/html displays as text at the top of the page.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I use this with no problem....

<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-5">

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

I still don't understand what you are trying to do, and what you thought that

Content#-type: text#/html


would accomplish.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Content-type question
 
Similar Threads
Servlets with JDBC connection
browser attempts to save servlet rather than process it?
HTML source code while displaying JSP
${cookie.userName.value} doesn't give any value
maintain the format of xml message on browser