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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setContentType text/plain problem

Status
Not open for further replies.

fuadhamidov

Programmer
Sep 22, 2003
98
TR
hi everybody

i can't understand why it does not print "\t" and "\n". the output is "Test1 Test2". it should be
Code:
Test1


          Test2
my code is bellow

Code:
<%@page import="java.io.*" %><%
response.setContentType("contentType='text/plain;'");
PrintWriter pw = response.getWriter();
pw.println( "Test1" );
pw.println();
pw.println( "\n\t\t" + "Test2" );
pw.flush();
pw.close();%>
 
You should change this :

response.setContentType("contentType='text/plain;'");


to :

response.setContentType("text/plain");


--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top