Automatic prompt for strust. xml code in MyEclipse, and prompt for myeclipse code
1. Open the MyEclipse Window and select the "Preferences" option under the "Window" menu,
2. Search for "xml" in the "Preferences" interface, select the "XML Catalog" option, and then select the "Add..." button on the right.
3. In the displayed dialog box, enter struts in "location. the location of the dtd file corresponding to the xml file. It is recommended that you do not select a directory with Chinese characters. Sometimes the prompt is not displayed because the Chinese directory is selected.
Select the "File System" button and find the location of the dtd File, "E: \ struts-2.3.4.1 \ src \ core \ src \ main \ resources ", there is a "struts-2.3.dtd" file under this path, this is the file we are looking for, so after selecting this file, the location content is: "E: \ struts-2.3.4.1 \ src \ core \ src \ main \ resources \ struts-2.3.dtd, then select the type as URI in the Key type ", enter "keys" in the "Key" field.
4. Open the strust. xml file. Note the file title header <! DOCTYPE> the url in the tag must be the same as the key set in the tag. As follows.
1 <?xml version="1.0" encoding="UTF-8" ?>2 <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.3.dtd">3 <struts>4 5 </struts>
In this way, when "<" is entered in the struts. xml file, a prompt is displayed ,: