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
mymodule.js.

Where have I gone wrong?

I am using Tynamo's Tomcat/Eclipse plugin (
http://www.tynamo.org/Developing+with+Tomcat+and+Eclipse/)

I have a feeling that perhaps my build or deployment are 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).

More details if useful:
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 requires my module like this:
<script type="text/javascript">require(["t5/core/pageinit"], function(pi) {
pi([], [
  "mymodule.js",
]); });</script>

here's my directory structure:

src/main/
src/main/resources
src/main/resources/META-INF
src/main/resources/META-INF/modules
src/main/resources/META-INF/modules/mymodule.js
src/main/java
src/main/webapp
src/site
src/test
etc


Thanks in advance,

Claude

Reply via email to