This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display problem

 
Kumar Vinay
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi folks,
I am doing a project in servlets where in i am coming across some problems.
I am trying to read the text from a database which has to be displayed on the screen using servlet. I don't know how to store all the details of paragraph, tabs, carriage feeds what the user types in a input form which will be stored in the d/b and from the d/b it is read and displayed.
This is exactly same as how i am typing here ( ie., posting question in javaranch). All the paragraphs and line breaks what i am typing here is reflected correctly on the final display of my question. But in my case it is just appending
For instance,
This is vinay
-Bye
This should be reflected as it is in the final display. The
tags should be included for every new line.
But in my case it is displayed as
This is vinay -Bye

could anyone help me
Bye
Vinay
 
rajesh dalvi
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
put your paragraph in < pre > data from database < /pre > tags.
This will prevent browser from formatting data and showit as it is.
But this will not apply PAGE fonts to this data.
To use your fonts use style sheet classes.

[This message has been edited by rajesh dalvi (edited October 24, 2000).]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic