Eclipse JSP page code formatting

Source: Internet
Author: User

In eclipse, we usually use Ctrl + Shift + F to format and adjustCodeAfter formatting, it can be used well in Java/C/CPP files, but in JSP pages, CTRL + Shift + F is not satisfactory, especially for Java code in <%>, sometimes it can be described as a mess (Sometimes it is better to put Java code at the front of the page ), in short, it is very troublesome to format the code in JSP, and we hope this problem can be solved urgently.

 

By accident, you can choose to format the eclipse code in addition to Ctrl + Shift + F. Right-click and choose source> Format active elements (format dynamic elements ), in the past, eclipse separated formatting, which is not as convenient as netbean; the eclipse hotkey is Ctrl + I,Move the cursor to the front of the Java code in JSP,Select this menu or press the hotkey
CTRL + I: the code is formatted. In JSP, the effect is better than Ctrl + Shift + F.

 

In addition, this issue is better after the release of the eclipse Kepler version.

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.