Juan Pusong [
http://community.jboss.org/people/juanpusong] created the discussion
"Static resource not found for path query.maskedinput-1.3.js"
To view the discussion, visit:
http://community.jboss.org/message/645337#645337
--------------------------------------------------------------
I am trying to incorporate a jquery plugin (query.maskedinput-1.3.js) in my RichFaces
(richfaces-ui-3.3.3.Final) application. When I try to run the app in debug mode on an
Eclipse IDE (Helios) with JBoss Tools RichFaces v 3.2.0.v20110119-2004-H17-CR1 the app
throws the following exception:
javax.servlet.ServletException: Static resource not found for path
query.maskedinput-1.3.js
javax.faces.webapp.FacesServlet.service(FacesServlet.java:325)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
*root cause*
org.ajax4jsf.resource.ResourceNotFoundException: Static resource not found for path
query.maskedinput-1.3.js
org.ajax4jsf.resource.ResourceBuilderImpl.createStaticResource(ResourceBuilderImpl.java:463)
org.ajax4jsf.resource.ResourceBuilderImpl.createResource(ResourceBuilderImpl.java:267)
org.ajax4jsf.application.AjaxViewHandler.getResourceURL(AjaxViewHandler.java:142)
org.ajax4jsf.renderkit.LoadResourceRendererBase.encodeToHead(LoadResourceRendererBase.java:83)
org.ajax4jsf.context.ViewResources.processComponent(ViewResources.java:342)
org.ajax4jsf.context.ViewResources.traverse(ViewResources.java:381)
org.ajax4jsf.context.ViewResources.traverse(ViewResources.java:385)
org.ajax4jsf.context.ViewResources.processHeadResources(ViewResources.java:514)
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:193)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
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:313)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
It happens only in debug mode. However, when I run the application in Tomcat, the error
does not occur and the masked fields works fine indicating that the jquery plugin is
working properly.
Here's a snippet of my code:
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
<f:loadBundle basename="crms-messages"
var="labels"/>
<a4j:loadScript src="resource://jquery.js"/>
<a4j:loadScript src="resource://query.maskedinput-1.3.js"/>
<head>
<title><h:outputText
value="#{labels.crmsSystemName}"/></title>
</head>
<body style="width:800px; height:400px;">
<rich:panel id="entryPanel"
style="width:300px; margin:0 auto;" >
<f:facet name="header">
<h:outputText value="Data
Entry Form"/>
</f:facet>
<h:form>
<h:panelGrid columns="2">
<h:outputText value="Date Field"/>
<h:inputText
id="myDateFld" value="" size="20">
<rich:jQuery
selector="#myDateFld"
query="mask('99/99/9999',{placeholder:'
'})" timing="onload"/>
</h:inputText>
</h:panelGrid>
<h:panelGroup
style="text-align:right;"">
<h:commandButton
action="#{myBean.nextView}"
actionListener="#{myBean.entryListener}"
value="Entry"/>
</h:panelGroup>
</h:form>
</rich:panel>
</body>
</html>
Here's additional info that might help:
OS: Windows 7
JDK v 1.6.0.0_29
Tomcat : v7.0.6.
What is probably wrong. Any help would be greatly appreciated.
Thanks in advance
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/645337#645337]
Start a new discussion in JBoss Tools at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]