Resolve line wrapping in rs.getstring () in the JSP

Source: Internet
Author: User
Tags string mysql database
js| Solve | The problem

The recent use of JSP to do news release found that the rs.getstring () obtained by the string inside the space and the line of change are not shown,

First analysis of the reasons, I used the MySQL database, the news content used is the text type, view the database uploaded news found inside the line and space can be displayed, this explains, affirmation is to use rs.getstring when the problem, first view the java.sql.* API wants to use a different get method, try a few results,

There are similar problems on the web, but most of them are done in a servlet or in a bean, and I think it's complicated.

Finally found the solution in the call Rs.getstring page inside the table to add style= "Word-break:break-all"

The <pre>rs.getstring () <> label is used to show the problem of line wrapping. <pre></pre> This must not be less, in the form added style= "Word-break:break-all" to prevent a long string of English characters to open the table



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.