PDA

Click to See Complete Forum and Search --> : [RESOLVED] stupid JSP question


hockey1314
Jan 29th, 2009, 12:09 PM
I know its a jsp question but i hope someone can help me :)

this is what I have and it displays to a webpage just fine. But i dont like the format. Thats where i need help.

response.getwriter().write("label " + info1);
response.getwriter().write("label2 " + info2);

the code works and displays but it showes everything on one line. How can I get it to display it on 2 lines. i tried writeln and writeline..but duh ...that didnt work..

any ideas.

kfcSmitty
Jan 29th, 2009, 12:51 PM
I know its a jsp question but i hope someone can help me :)

this is what I have and it displays to a webpage just fine. But i dont like the format. Thats where i need help.

response.getwriter().write("label " + info1);
response.getwriter().write("label2 " + info2);

the code works and displays but it showes everything on one line. How can I get it to display it on 2 lines. i tried writeln and writeline..but duh ...that didnt work..

any ideas.

I haven't touched JSP in years, but I would imagine that your code is simply writing to the page, so try using HTML.


response.getwriter().write("label " + info1 + "<br />");
response.getwriter().write("label2 " + info2);

Should drop it down to the next line.

hockey1314
Jan 29th, 2009, 01:02 PM
your so smart. that did it. i had tried the br but didnt put them inside the quotes. stupid me.