Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-2658

Indicate a better error when using Facelet TAGs on JSP(X) pages

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: JSR-314
    • Labels:
      None

      Description

      when running on JSP(X) and using (by accident) some "facelets only tags", like "outputScript", you get (correctly) an error.

      However the error is ugly and (on first hand) not really meaningful:

      SEVERE: An exception occurred
      javax.faces.FacesException: org.apache.jasper.JasperException: PWC6143: No tag "outputScript" defined in tag library associated with uri "http://java.sun.com/jsf/html"
      at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241)
      at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:222)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
      at org.apache.myfaces.trinidaddemo.webapp.RedirectFilter.doFilter(RedirectFilter.java:97)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      at org.mortbay.jetty.Server.handle(Server.java:326)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
      at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:915)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
      at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      Caused by: org.apache.jasper.JasperException: PWC6143: No tag "outputScript" defined in tag library associated with uri "http://java.sun.com/jsf/html"
      at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:89)
      at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:375)
      at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:210)
      at org.apache.jasper.compiler.JspDocumentParser.parse(JspDocumentParser.java:260)
      at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:224)
      at org.apache.jasper.compiler.ParserController.parse(ParserController.java:140)
      at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:435)
      at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:608)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:360)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
      at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
      at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
      at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:438)
      at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:68)
      at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:68)
      at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:271)
      at org.apache.myfaces.view.jsp.JspViewDeclarationLanguage.buildView(JspViewDeclarationLanguage.java:101)
      at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:103)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:207)
      ... 25 more
      Caused by: org.xml.sax.SAXException: PWC6143: No tag "outputScript" defined in tag library associated with uri "http://java.sun.com/jsf/html"
      at org.apache.jasper.compiler.JspDocumentParser.parseCustomAction(JspDocumentParser.java:1199)
      at org.apache.jasper.compiler.JspDocumentParser.startElement(JspDocumentParser.java:445)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
      at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
      at org.apache.jasper.compiler.JspDocumentParser.parse(JspDocumentParser.java:219)
      ... 49 more

        Attachments

          Activity

            People

            • Assignee:
              jakobkorherr Jakob Korherr
              Reporter:
              matzew Matthias Wessendorf
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: