Add a DTD to eclipse

Source: Internet
Author: User

Problem description:
The configuration file struts. xml to write struts2 is:
<? Xml version = "1.0" encoding = "UTF-8"?>
<! DOCTYPE struts PUBLIC
"-// Apache Software Foundation // DTD Struts Configuration 2.0 // EN"
Http://struts.apache.org/dtds/struts-2.0.dtd>
But no prompt Function

Steps:
1. Decompress struts-2.2.1 (compressed package)
2. Click apps to enter
3, click the struts2-blank-2.2.1.war open mode winRAR compressed file manager
4, click the WEB-INF to see lib, and then drag the lib out. Store in a path
For example, E: \ back up \ teacher \ day59 \ struts2 Documents \ struts-2.2.1 \ apps at any time
5, click this lib to enter unzip the xwork-core-2.2.1 compressed package
6. Click here to decompress the package and enter. You can see the xwork-2.0.dtd file.
For example: E: \ backup at any time \ teacher \ day59 \ struts2 material \ struts-2.2.1 \ apps \ lib \ xwork-core-2.2.1

Then click
Windows --> preferences --> Files and Editors --> XML Catalog --> Add

Location: equal to the path in Step 6
Key: equals-// Apache Software Foundation // DTD Struts Configuration 2.0 // EN
Click OK !!!!!!!!!!

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.