1 Reply Latest reply on Jun 14, 2016 11:03 AM by alainpannetier2

    AS 7.2.2 <ui:insert> Attribute 'src', 'file' or 'page' is required

    alainpannetier2

      I've got a weird one on a 7.2.2 instance

       

      javax.servlet.ServletException: /WEB-INF/template.xhtml @10,38 <ui:insert> Attribute 'src', 'file' or 'page' is required

       

      Here is the "faulty" template (WEB-INF/template.xhtml).

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE html>
      <html xmlns="http://www.w3.org/1999/xhtml"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:p="http://primefaces.org/ui"
            xmlns:f="http://xmlns.jcp.org/jsf/core"
            xmlns:ui="http://xmlns.jcp.org/jsf/facelets">

          <h:head>
            <title><ui:insert name="title">My Beautiful Web App</ui:insert></title>

       

      As far as I know <ui:insert> supports only the name attribute

      I suspect a namespace collision but am clueless...

      And here is the full stack trace

       

      javax.servlet.ServletException: /WEB-INF/template.xhtml @10,38 <ui:insert> Attribute 'src', 'file' or 'page' is required
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
           org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
      

      JBWEB000071: root cause

      javax.faces.view.facelets.FaceletException: /WEB-INF/template.xhtml @10,38 <ui:insert> Attribute 'src', 'file' or 'page' is required
           com.sun.faces.facelets.tag.AbstractTagLibrary$UserComponentHandlerFactory.createHandler(AbstractTagLibrary.java:309)
           com.sun.faces.facelets.tag.AbstractTagLibrary.createTagHandler(AbstractTagLibrary.java:676)
           com.sun.faces.facelets.tag.CompositeTagLibrary.createTagHandler(CompositeTagLibrary.java:184)
           com.sun.faces.facelets.compiler.TagUnit.createFaceletHandler(TagUnit.java:120)
           com.sun.faces.facelets.compiler.TextUnit.createFaceletHandler(TextUnit.java:117)
           com.sun.faces.facelets.compiler.CompilationUnit.getNextFaceletHandler(CompilationUnit.java:115)
           com.sun.faces.facelets.compiler.NamespaceUnit.createFaceletHandler(NamespaceUnit.java:82)
           com.sun.faces.facelets.compiler.CompilationUnit.getNextFaceletHandler(CompilationUnit.java:115)
           com.sun.faces.facelets.compiler.CompilationUnit.createFaceletHandler(CompilationUnit.java:106)
           com.sun.faces.facelets.compiler.CompilationManager.createFaceletHandler(CompilationManager.java:373)
           com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:441)
           com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:403)
           com.sun.faces.facelets.compiler.Compiler.compile(Compiler.java:124)
           com.sun.faces.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:319)
           com.sun.faces.facelets.impl.DefaultFaceletFactory.access$100(DefaultFaceletFactory.java:92)
           com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:159)
           com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:157)
           com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:79)
           com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:74)
           com.sun.faces.util.ExpiringConcurrentCache$1.call(ExpiringConcurrentCache.java:99)
           java.util.concurrent.FutureTask.run(FutureTask.java:262)
           com.sun.faces.util.ExpiringConcurrentCache.get(ExpiringConcurrentCache.java:114)
           com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:117)
           com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:58)
           com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:256)
           com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:378)
           com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:358)
           com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
           com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
           com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
           com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
           com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:164)
           com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:902)
           com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:99)
           com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
           com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
           org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)