Web. XML Order not error

Source: Internet
Author: User

If Web. XML prompts the following error:

The content of element type "Web-app" must match "(icon?,display-name?,description?,distributable?,context-param*, Filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?, error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*, env-entry*,ejb-ref*,ejb-local-ref*) "

You can try the following workarounds:

1. Remove the second line of the file <!  DOCTYPE Web-app ...  .. .. > This sentence description (not recommended)

2. Put the labels in the correct order (in the correct order), this method can sometimes solve the problem

3. Separate the pairing labels like <filter>--<filter-mapping> and <servlet>--<servlet-mapping>, i.e. all <filter > (<servlet>) is written together and all <filter-mapping> (<servlet-mapping>) are written together.

Attached: Web. XML Label Placement Order

1. Icon?

2. Display-name?

3. Description?

4. distributable?

5. context-param*

6. filter*

7. filter-mapping*

8. listener*

9. servlet*

10.servlet-mapping*

11.session-config?

12.mime-mapping*

13.welcome-file-list?

14.error-page*

15.taglib*

16.resource-env-ref*

17.resource-ref*

18.security-constraint*

19.login-config?

20.security-role*

21.env-entry*

22.ejb-ref*

23.ejb-local-ref

"?" Indicates that the label will occur up to 1 times, and "*" indicates multiple occurrences.

Web. XML Order not error

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.