Problem with the Tag of "" in web.xml file, when creating struts web project.

 

There is one problem with the Tag of "<tablib>" , when creating struts web project.. The error prompt as "cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'"

<web-app>

  .....

 <taglib>
     <taglib-uri>/tags/struts-tiles</taglib-uri>
     <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
   </taglib>
</web-app>

 

Solution: Surround a tag of "jsp-config" :

</web-app>

...

  <jsp-config>
   <taglib>
     <taglib-uri>/tags/struts-tiles</taglib-uri>
     <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
   </taglib>
  </jsp-config>
 
</web-app>

你可能感兴趣的:(Problem with the Tag of "" in web.xml file, when creating struts web project.)