• Post Reply Bookmark Topic Watch Topic
  • New Topic

order of error-page tag in DD  RSS feed

Anoopriya Muthuswaami
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any rule that <error-page> tag must come only AFTER <servlet> tag.

I tried by placing <error-page> before <servlet> and it worked for me.

But in the folowing link
the explanation is given as <error-page> must appear only after <servlet> tag

As per my understanding, only the sub-elements in a tag must be in order.

Please clarify.
cesar valencia
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I once made a project with the Eclipse IDE placing the error-page element before any of the servlet elements, and it didn't work. It would show an error while trying to compile the project. I took notice, fixed and it worked like a charm.

however, the official documentation in the xsd is as follows:

The web-app element is the root of the deployment
descriptor for a web application. Note that the sub-elements
of this element can be in the arbitrary order. Because of
that, the multiplicity of the elements of distributable,
session-config, welcome-file-list, jsp-config, login-config,
and locale-encoding-mapping-list was changed from "?" to "*"
in this schema. However, the deployment descriptor instance
file must not contain multiple elements of session-config,
jsp-config, and login-config. When there are multiple elements of
welcome-file-list or locale-encoding-mapping-list, the container
must concatinate the element contents. The multiple occurance
of the element distributable is redundant and the container
treats that case exactly in the same way when there is only
one distributable.

maybe it is container dependant?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!