To work, you must use jstl to replace/N in multiple lines of text extracted from the database with <br/>.
1. Put the extracted multi-line text in the <PRE> </PRE> label
Advantage: simple. html is used to solve the problem.
Disadvantage: Pre does not seem to recognize the CSS style. This label is "unchanged" and CSS does not recognize it. This disadvantage is fatal.
Ii. jstl-only mode <C: Out value = "$ {fn: Replace (content, '/N',' <br/> ')}"/>
Multiple n errors will be thrown during a single operation.
3. jstl + JSP scriptlet
<%
Request. setattribute ("x_n", "/N ");
%>
<C: Out value = "$ {fn: Replace (content, X_n, '<br/>')}"/>
Advantages: easy to understand and easy to modify
Disadvantage: JSP scriptlet is referenced.ProgramMembers are intolerable;CodeMany.
4. jstl + JavaBean
There is no new idea, but the scriptlet is gone, but the class file needs to be modified.
5. Use listeners
Advantage: when the application is initialized,/N is used as an attribute in the application scope, with less code and resource saving.
Disadvantage: XML needs to be configured, which must be modified in the class during modification.
6. Use custom tags
Customize a db2html tag, <C: Out value = "$ {fnx: db2html (content)}"/>
Advantages: easy to use,
Disadvantage: There are many configurations. Trouble.