<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Static resource not found for path query.maskedinput-1.3.js
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/juanpusong">Juan Pusong</a> in <i>JBoss Tools</i> - <a href="http://community.jboss.org/message/645337#645337">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>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:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 10pt;">javax.servlet.ServletException: Static resource not found for path query.maskedinput-1.3.js</span></p><p><span style="font-family: 'courier new', courier; font-size: 10pt;"> javax.faces.webapp.FacesServlet.service(FacesServlet.java:325)</span></p><p><span style="font-family: 'courier new', courier; font-size: 10pt;"> org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)</span></p><p><span style="font-family: 'courier new', courier; font-size: 10pt;"> org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)</span></p><p><span style="font-family: 'courier new', courier; font-size: 10pt;"> org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)</span></p><p><span style="font-family: 'courier new', courier; font-size: 10pt;"> org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)</span></p><p><span style="font-family: 'courier new', courier; font-size: 10pt;"> org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier; font-size: 10pt;"><strong>root cause</strong> </span></p><pre class="jive-pre"><span style="font-family: 'courier new', courier; font-size: 10pt;">org.ajax4jsf.resource.ResourceNotFoundException: Static resource not found for path query.maskedinput-1.3.js</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     org.ajax4jsf.resource.ResourceBuilderImpl.createStaticResource(ResourceBuilderImpl.java:463)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     org.ajax4jsf.resource.ResourceBuilderImpl.createResource(ResourceBuilderImpl.java:267)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     org.ajax4jsf.application.AjaxViewHandler.getResourceURL(AjaxViewHandler.java:142)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     org.ajax4jsf.renderkit.LoadResourceRendererBase.encodeToHead(LoadResourceRendererBase.java:83)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     org.ajax4jsf.context.ViewResources.processComponent(ViewResources.java:342)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     org.ajax4jsf.context.ViewResources.traverse(ViewResources.java:381)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     org.ajax4jsf.context.ViewResources.traverse(ViewResources.java:385)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     org.ajax4jsf.context.ViewResources.processHeadResources(ViewResources.java:514)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:193)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)</span><br/><span style="font-family: 'courier new', courier; font-size: 10pt;">     org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)</span><br/></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Here's a snippet of my code:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote"><p><span style="font-family: 'courier new', courier;"><span><html xmlns="</span><a class="jive-link-external-small" href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a><span>"</span></span></p><p><span style="font-family: 'courier new', courier;"><span>      xmlns:h="</span><a class="jive-link-external-small" href="http://java.sun.com/jsf/html" target="_blank">http://java.sun.com/jsf/html</a><span>"</span></span></p><p><span style="font-family: 'courier new', courier;"><span>      xmlns:f="</span><a class="jive-link-external-small" href="http://java.sun.com/jsf/core" target="_blank">http://java.sun.com/jsf/core</a><span>"</span></span></p><p><span style="font-family: 'courier new', courier;"><span>      xmlns:ui="</span><a class="jive-link-external-small" href="http://java.sun.com/jsf/facelets" target="_blank">http://java.sun.com/jsf/facelets</a><span>"</span></span></p><p><span style="font-family: 'courier new', courier;"><span>      xmlns:rich="</span><a class="jive-link-external-small" href="http://richfaces.org/rich" target="_blank">http://richfaces.org/rich</a><span>"</span></span></p><p><span style="font-family: 'courier new', courier;"><span>      xmlns:a4j="</span><a class="jive-link-external-small" href="http://richfaces.org/a4j" target="_blank">http://richfaces.org/a4j</a><span>"></span></span></p><p>             </p><p><span style="font-family: 'courier new', courier;">          <f:loadBundle basename="crms-messages" var="labels"/></span></p><p><span style="font-family: 'courier new', courier;">  <a4j:loadScript src="resource://jquery.js"/></span></p><p><span style="font-family: 'courier new', courier;">  <a4j:loadScript src="resource://query.maskedinput-1.3.js"/></span></p><p><span style="font-family: 'courier new', courier;">          <head></span></p><p><span style="font-family: 'courier new', courier;">                         <title><h:outputText value="#{labels.crmsSystemName}"/></title></span></p><p><span style="font-family: 'courier new', courier;">  </head></span></p><p>  </p><p><span style="font-family: 'courier new', courier;">          <body style="width:800px; height:400px;"></span></p><p><span style="font-family: 'courier new', courier;">                         <rich:panel id="entryPanel" style="width:300px; margin:0 auto;" ></span></p><p><span style="font-family: 'courier new', courier;">                                        <f:facet name="header"></span></p><p><span style="font-family: 'courier new', courier;">                                                       <h:outputText value="Data Entry Form"/></span></p><p><span style="font-family: 'courier new', courier;">                                        </f:facet></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier;">             <h:form></span></p><p><span style="font-family: 'courier new', courier;">                                        <h:panelGrid columns="2"></span></p><p><span style="font-family: 'courier new', courier;">                  <h:outputText value="Date Field"/></span></p><p><span style="font-family: 'courier new', courier;">                                                       <h:inputText id="myDateFld" value="" size="20"></span></p><p><span style="font-family: 'courier new', courier;">                                                                      <rich:jQuery selector="#myDateFld" </span></p><p><span style="font-family: 'courier new', courier;">                         query="mask('99/99/9999',{placeholder:' '})" timing="onload"/></span></p><p><span style="font-family: 'courier new', courier;">                                                       </h:inputText></span></p><p><span style="font-family: 'courier new', courier;">                                        </h:panelGrid></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier;">                                        <h:panelGroup style="text-align:right;""></span></p><p><span style="font-family: 'courier new', courier;">                                                       <h:commandButton action="#{myBean.nextView}" </span></p><p><span style="font-family: 'courier new', courier;">                    actionListener="#{myBean.entryListener}" value="Entry"/> </span></p><p><span style="font-family: 'courier new', courier;">                                        </h:panelGroup></span></p><p><span style="font-family: 'courier new', courier;">                                        </h:form></span></p><p><span style="font-family: 'courier new', courier;">                         </rich:panel></span></p><p><span style="font-family: 'courier new', courier;">          </body></span></p><p><span style="font-family: 'courier new', courier;"></html></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier;"><br/></span></p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Here's additional info that might help:</p><p>OS: Windows 7</p><p>JDK v 1.6.0.0_29</p><p>Tomcat : v7.0.6.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>What is probably wrong. Any help would be greatly appreciated.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thanks in advance</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/645337#645337">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Tools at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>