Jsp Summary 1, 2

Source: Internet
Author: User

1.Jsp (preferred for SUN Enterprise applications)When the content entered on the page is displayedTagText and line feed processing

Enter two lines of text in the text input box on the input page:

<Br> huuhh <br>

<B> zookeeper </B> zookeeper <BR>♪

After confirmation, it is found that the line feed information has been removed automatically when it is transferred to the next confirmation page. In addition,TagText to be processedHtmlProcessing Method,

The input information is not displayed correctly.

Solution

On the confirmation page, you can solve the problem as follows:

Assume that the information to be displayed is saved in a string variable.CommentBefore the display, do the following:

  <Td bgcolor = "# ffffff" valign = "top">

<% String comment = ifkbncomment. getValue ();

Comment = comment. replaceAll ("<", "& lt ");//Convert"<"Use"& Lt"Laidai

Comment = comment. replaceAll (">", "& gt ");//Convert

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.