servlets

S

suhas

how to create a new line in servlets?? if i use
Printwriter out= res.getwriter()
out.print()
no new line is creating...please help me out...
 
M

markspace

how to create a new line in servlets?? if i use
Printwriter out= res.getwriter()
out.print()
no new line is creating...please help me out...


Well, depends on your output format. But if you are sending HTML,
usually a break <br /> will do the trick.

PrintWriter out = res.getWriter();
out.print( "<br />" );

Not tested.
 
R

Roedy Green

how to create a new line in servlets?? if i use
Printwriter out= res.getwriter()
out.print()
no new line is creating...please help me out...

It has nothing to do with Servlets. print does not emit a new line;
println does.
--
Roedy Green Canadian Mind Products
http://mindprod.com
How long did it take after the car was invented before owners understood
cars would not work unless you regularly changed the oil and the tires?
We have gone 33 years and still it is rare to uncover a user who
understands computers don't work without regular backups.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top