I have form which has got in it Textarea field which allows users to enter the data.Data entered by the user could go upto any length.I would like to maintain the format of the data as entered by the user and display it in the view.Currently Format is not being maintained by my program.I would like to maintain the format as entered by the user and display it.
My environment is servlets,JSP,EL, JSTL and mysql .I use JSTL/EL to display the data from the classes.Currently textarea data is stored as varchar in mysql.I need some directions as how to maintain the format of the data and display it in the view without breaking the format as entered by the user.
Can some one point me to right direction as how this can be implemented.
Below is updated informations,
This is what user gives input as in text area field,
- The law requires all states to have exchanges, which are essentially online marketplaces where small businesses and individuals can shop for private health plans, in place by January 2014, when a requirement takes effect for most Americans to have health insurance or pay a penalty.
- If states fail to submit plans for running their own exchanges by the deadline, the law calls for the federal government to set up and run one for them, with or without their help. People with incomes between 133 percent and 400 percent of the poverty level can get federal tax subsidies through exchanges to make the price of coverage more affordable
This is how it looks like in my jsp view,
- The law requires all states to have exchanges, which are essentially online marketplaces where small businesses and individuals can shop for private health plans, in place by January 2014, when a requirement takes effect for most Americans to have health insurance or pay a penalty. 2. If states fail to submit plans for running their own exchanges by the deadline, the law calls for the federal government to set up and run one for them, with or without their help. People with incomes between 133 percent and 400 percent of the poverty level can get federal tax subsidies through exchanges to make the price of coverage more affordable
Also I was to preserve the links given in my text area fields along with formatting as entered by the user.
Also I don’t have any framework in my application.I know JSF has got the some features where it escapes the textarea data and renders it via pre elements maintaining the format as given by the users.How can this be done without any framework ?
${yourTextareaContent}` just fix your problem? – Jasper de Vries Sep 24 '12 at 17:24