Eclipse (MyEclipse) using smart hints to configure an XML file (GO)

Source: Internet
Author: User

Java code
    1. http: //STRUTS.APACHE.ORG/DTDS/STRUTS-2.0.DTD   

1.struts.xml Smart Tips

The syntax rules in this XML are defined here, and it's hard to see how this syntax rule is taken from the Internet every time. I need to configure it for cost.

Click Window->preferences->xml->xml Catalog.

Click Add.

pressurizing the Struts2-core-2.1.8.1.jar file, you can see the Struts-2.1.7.dtd file.

Select the DTD file in the location, my choice is:D:\javalib\struts 2.x\struts-2.1.8.1\lib\struts2-core-2.1.8.1\struts-2.0.dtd

Key Type:URI

Key:http://struts.apache.org/dtds/struts-2.0.dtd


2.Applicationcontext.xml Smart tip:


Spring as an example:
1. Introduce the appropriate JAR package
2.IDE in Window->preferences->xml->xml Catalog->add.
3.key Type->uri
4.location->file system->spring_home/dist/resources/spring-beans-2.0.xsd
5.key Type->schema Location
6.key followed by filename/spring-beans-2.0.xsd
7.OK

The summary is:

Window--->preferences--->myeclipse--->files and Editors--->xml--->xml Catalog--->add ...---> File System--->

D:\MYECLIPSE8.5\COMMON\PLUGINS\COM.GENUITEC.ECLIPSE.J2EEDT.CORE_8.4.100.ME200912151537\CATALOG-DTD \ XWORK-VALIDATOR-1.0.2.DTD

Red font for my personal myeclipse installation directory under the path, of course, this directory does not necessarily have the DTD file you want, at this time we can manually copy the required DTD files to this directory.

Key Type : URI,

Key : The DOCTYPE in the target DTD file is/HTTP//... Copy and paste to this.

make display the prompt selection with alt+/

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.