?
Solved

String not coming with CRLF from bean to jsp

Posted on 2003-03-17
3
Medium Priority
?
193 Views
Last Modified: 2010-03-31
i call a bean mb from jsp page
the method is as following...
String run(Stiring df)
{

return dfdsf;
}
it returns a multiline String
while testing in the bean class itself the String has all the newline characters, so
the lines come separarately
but when jsp page calls it, the output comes in a single line
can somebody help with this plz?
0
Comment
Question by:ashutoshleo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 8154803
I assume you're rendering this multiline String in a web browser. Browsers have no obligation to render line breaks and usually don't. Enclose the String in <pre>yourString</pre>
0
 

Author Comment

by:ashutoshleo
ID: 8154922
Thank you very much!!
You guessed it exactly. That was ther problem.
Now it is coming exactly as the bean method gives the output.
Thanks
0
 

Author Comment

by:ashutoshleo
ID: 8154923
Thank you very much!!
You guessed it exactly. That was ther problem.
Now it is coming exactly as the bean method gives the output.
Thanks
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question