Add offline DTD validation when writing configuration files using frameworks such as mybatis, struts, etc.

Source: Internet
Author: User

When writing a configuration file using a framework such as MyBatis,Struts, and so on, the configuration file is an XML file and is validated by the online DTD, if the current system is not networked, And the development tool does not integrate the required DTD validation files, it is necessary to manually set the local DTD file validation.

The following are examples of configurations in mybatis:

1. Open the configuration file


copy:http://mybatis.org/dtd/mybatis-3-mapper.dtd

2, to obtain the DTD verification file, directly on the networked computer browser to enter the last step copy of the URL: such as http://mybatis.org/dtd/mybatis-3-mapper.dtd Can download DTD Verification, also can be found in the MyBatis source code, approximate location such as:

650) this.width=650; "border=" 0 "width=" 352 "height=" 575 "src="/e/u261/themes/default/images/spacer.gif "alt=" 2.PNG " Style= "Background:url ("/e/u261/lang/zh-cn/images/localimage.png ") no-repeat center;border:1px solid #ddd;"/>

3. Copy the files from the previous step to the project src folder

4. Select window-preferences, enter catalog in the search box ,

650) this.width=650; "border=" 0 "width=" 535 "height=" 369 "src="/e/u261/themes/default/images/spacer.gif "alt=" 3.PNG " Style= "Background:url ("/e/u261/lang/zh-cn/images/localimage.png ") no-repeat center;border:1px solid #ddd;"/>

650) this.width=650; "border=" 0 "width=" 554 "height=" 490 "src="/e/u261/themes/default/images/spacer.gif "alt=" 4.PNG " Style= "Background:url ("/e/u261/lang/zh-cn/images/localimage.png ") no-repeat center;border:1px solid #ddd;"/>

5. Select the XML Catalogand click Add

650) this.width=650; "border=" 0 "width=" 554 "height=" "src=" "/e/u261/themes/default/images/spacer.gif" alt= "5.PNG" Style= "Background:url ("/e/u261/lang/zh-cn/images/localimage.png ") no-repeat center;border:1px solid #ddd;"/>

6, Note that the left is selected catalogentry , click Workspace Select the project name in the SRC folder above the copied DTD file,

650) this.width=650; "border=" 0 "width=" 550 "height=" 126 "src="/e/u261/themes/default/images/spacer.gif "alt=" 6.PNG " Style= "Background:url ("/e/u261/lang/zh-cn/images/localimage.png ") no-repeat center;border:1px solid #ddd;"/>

7. Select in key type :URI,key: Enter the network path of the copied DTD file;

650) this.width=650; "border=" 0 "width=" 543 "height=" 182 "src="/e/u261/themes/default/images/spacer.gif "alt=" 7.PNG " Style= "Background:url ("/e/u261/lang/zh-cn/images/localimage.png ") no-repeat center;border:1px solid #ddd;"/>

8. Click OK ... When you save your settings, you will also be prompted when you write the configuration file when the computer is not networked.

Other configuration similar, slightly ...


This article is from the "11408195" blog, please be sure to keep this source http://11418195.blog.51cto.com/11408195/1833770

Add offline DTD validation when writing configuration files using frameworks such as mybatis, struts, etc.

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.