3 Replies Latest reply on May 21, 2007 4:58 PM by Fernando Montaño

    Force prototype.js include

    Dustin Norlander Apprentice

      Hello,

      I use prototype.js in many of my custom scripts. I would like to ensure that it is included in every page, regardless of whether a4j or richfaces needs it (I'd like to include the one packaged with a4j). is this possible?

      thanks
      Dustin

        • 1. Re: Force prototype.js include
          Fernando Montaño Expert

          Yes you can. Just add below line in every page (or once in your template).

          <a4j:loadScript src="resource://prototype.js"/>
          


          HTH.

          • 2. Re: Force prototype.js include
            Dustin Norlander Apprentice

            thanks, thats exactly what I was looking for -- except it doesn't work.. Is there some other configuration I need to do?

            thanks,
            Dustin

            16:39:08,495 ERROR [ExceptionFilter] uncaught exception
            javax.servlet.ServletException: Static resource not found for path prototype.js
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:249)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:59)
             at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:59)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:55)
             at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:81)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:55)
             at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:47)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:55)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:293)
             at org.jboss.seam.web.AbstractAjax4jsfFilter.doFilter(AbstractAjax4jsfFilter.java:35)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:55)
             at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:126)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
             at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
             at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
             at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
             at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
             at java.lang.Thread.run(Thread.java:595)
            Caused by: org.ajax4jsf.framework.resource.ResourceNotFoundException: Static resource not found for path prototype.js
             at org.ajax4jsf.framework.resource.ResourceBuilderImpl.createStaticResource(ResourceBuilderImpl.java:424)
             at org.ajax4jsf.framework.resource.ResourceBuilderImpl.createResource(ResourceBuilderImpl.java:243)
             at org.ajax4jsf.framework.ajax.AjaxViewHandler.getResourceURL(AjaxViewHandler.java:200)
             at org.ajax4jsf.renderkit.LoadResourceRendererBase.getResources(LoadResourceRendererBase.java:85)
             at org.ajax4jsf.renderkit.LoadResourceRendererBase.getHeaderScripts(LoadResourceRendererBase.java:51)
             at org.ajax4jsf.framework.ajax.AjaxContext.processHeadResources(AjaxContext.java:458)
             at org.ajax4jsf.framework.ajax.AjaxContext.processHeadResources(AjaxContext.java:475)
             at org.ajax4jsf.framework.ajax.AjaxContext.processHeadResources(AjaxContext.java:384)
             at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:262)
             at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
             at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
             at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
             ... 37 more
            


            • 3. Re: Force prototype.js include
              Fernando Montaño Expert

              Use the latest ajax4jsf version. There was a problem solved recently.

              http://maven.exadel.com/org/ajax4jsf/ajax4jsf/1.1.1-SNAPSHOT/