Forums Register Login

problem in newline

+Pie Number of slices to send: Send

This is my doPost method, when it is running, giving the output with the name paramter as puspender :
hello name is puspender

but i have included the newline with "\n", then why not the line2 is on the next line to line1 ?
why not the output is :
hello
name is puspender
+Pie Number of slices to send: Send
You're generating HTML, remember? So your question is about the HTML you generated, not how you generated the HTML.

You should review how HTML handles newlines and other whitespace characters.
+Pie Number of slices to send: Send
Not only is your HTML invalid (nothing should come after the </html> closing tag), that's not how HTML works. newlines are not significant. You create "lines" in HTML via HTML elements and CSS.
+Pie Number of slices to send: Send
Thanks Paul and Bear
Did you just should on me? You should read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 723 times.
Similar Threads
Java servlet neither runs nor shows any error. Just shows blank page in browser
unable to read session attribute in JSP
can a servlet do POST or what?
Problem with doGet and doPost methods
how to retrieve data from html table in servlet and insert it into database
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:18:00.