tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claude Andrew <bronzen...@gmail.com>
Subject Modules not found by Tapestry 5.4.1; serving 'index' instead
Date Fri, 01 Jul 2016 05:31:06 GMT
I just upgraded to 5.4.1 from 5.3.  I am switching my js libraries to
requirejs modules.  Following the guide at
http://tapestry.apache.org/javascript-modules.html, I placed my module
files in 'src/main/resources/META-INF/modules' and included one in a page's
java class:
@Import(module = { "mymodule.js",})

When I load the page and look at mymodule.js in the browser it shows me the
html of my index page instead of the javascript in my mymodule.js file.
This looks as though Tapestry has no idea that it has a resource called

I am using Tynamo's Tomcat/Eclipse plugin (

I have a feeling that perhaps my project configuration is losing the new
META-INF directory and Tapestry never sees it but I have no idea where to
go to test or fix that (shame on me).  I have followed the dots I know
about and they all seem connected.  I'm sure it's obvious but I can't see
it.  Where have I gone wrong?

Thanks in advance,


More details:

The tomcat plugin is configured for "Context files" and points to
which is where I find be ROOT.xml which contains
<Context path="/ROOT" reloadable="true"
workDir="/home/claude/[...]/admin/work" >
<Loader className="org.apache.catalina.loader.DevLoader" reloadable="true"
debug="1" useSystemClassLoaderAsParent="false" />
and in /home/claude/[...]/admin/src/main/webapp I find directories WEB-INF
and META-INF, and in META-INF/modules I find the js files that I'd like
tapestry to pick up and serve as modules.

The path the browser shows for the resource is "
http://localhost:8080/mymodule.js" which seems appropriate as my app is
deployed as ROOT.

The tail of my page (that ends up being served index's html instead of my
module's js) requires my module like this:
<script type="text/javascript">require(["t5/core/pageinit"], function(pi) {
pi([], [
]); });</script>

here's my excerpted project structure:

src/main/resources/META-INF/modules/mymodule.js  <-- not picked up as a

PS - sorry if this is a duplicate; I sent the message earlier but
accidentally from an address that's not the one I'm subscribed with and I
think that one was discarded by the list server.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message