2 Replies Latest reply on Dec 7, 2003 7:10 PM by firstrainbow

    <security-constraint> conflict with <taglib>


      My environment is jbuilder8+struts+jboss3.2+tomcat.I want to use Form based authentication in my application. so I define the <security-constraint> in my web.xml. and because I use the struts, the elments also exists in my web.xml. However when I build the application, it will show errors: Exception initializing TldLocationsCache: XML parsing error on file /WEB-INF/web.xml: (line 54, col -1). If I cut any one of them, the build process will be successful! Why?
      can anyone help me? I will appreciate!

        • 1. Re: <security-constraint> conflict with <taglib>

          Please check that the and <security-constraint> elements are in the right order. The right order is shown in the dtd fragment below: taglib before security-constraint.

          <!ELEMENT web-app (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*)>

          • 2. Re: <security-constraint> conflict with <taglib>

            I have proved that you are right. Thank you very much.
            I had check out the ddt just to foud the ddt have these elements, I hadn't consider the order the these elements .
            Thank you again!