Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

preserving the format of data when entered in text area

843840Nov 5 2007 — edited Nov 6 2007
We want to save data as text without altering the formatting.
class Bus extends Vehicle {}
class TestSamp {
public static void main(String [] args) {

ArrayList<Car> a = new ArrayList<Car>();
}

I am saving this data as text. When I retrieve the data I get it as

class Bus extends Vehicle {}class TestSamp {public static void main(String [] args) {ArrayList<Car> a = new ArrayList<Car>();}

This data has been entered into text area from a browser by the user.
When saving this database strips the white spaces and new line characters.
We want to preserve the formatting.
For eg the way you type in this text box in this website, the data would be displayed exactly in same format. This is how we want it.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 4 2007
Added on Nov 5 2007
5 comments
701 views