Hi Daniel

In what environment is your application running? I had the same problem that the classpath lookup failed for the dojo-assets when deploying my webapp as part of an EAR in JBoss.

You may change the dojo-assets to be looked up in application context instead of classpath.
In your page / component spec add:

<asset name="tapestrySource"
   path="context:/assets/static/tapestry/core.js" />
<asset name="dojoSource"
   path="context:/assets/static/dojo/dojo.js" />
<asset name="dojoPath" path="context:/assets/static/dojo/" />


In the page head:

<script jwcid="@ScriptIncludes"
   tapestrySource="asset:tapestrySource"
   dojoSource="asset:dojoSource"
   dojoPath="asset:dojoPath"></script>

(same params apply for Shell-component as well)

Then unpack the tapestry-framework.jar and copy the folders "tapestry" and "dojo" to webapps context for packaging.

This worked for me.

Cheers,
mika


Daniel Anguita O. wrote:
Anyone can help me to make this simple application works?
The idea is to make a button that when i click on it some DOM reload showing a message like "Ok. It works". I first try with the *tapestry home page* example and i'm getting a dojo's error:

----------------------------------- Firefox shows ----------------
Big brother is watching you.
DEBUG: failed loading /Ajax/app?service=asset&path=%2Fdojo%2Fsrc/widget/html/ContentPane.js with error: [SyntaxError: XML tag name mismatch (expected HR), file: http://localhost:8080/RemoteControl/app?service=asset&path=%2Fdojo%2Fdojo.js, line: 96] DEBUG: failed loading /Ajax/app?service=asset&path=%2Fdojo%2Fsrc/widget/html.js with error: [SyntaxError: XML tag name mismatch (expected HR), file: http://localhost:8080/Ajax/app?service=asset&path=%2Fdojo%2Fdojo.js, line: 96] DEBUG: failed loading /Ajax/app?service=asset&path=%2Fdojo%2Fsrc/widget.js with error: [SyntaxError: XML tag name mismatch (expected HR), file: http://localhost:8080/Ajax/app?service=asset&path=%2Fdojo%2Fdojo.js, line: 96] DEBUG: failed loading /Ajax/app?service=asset&path=%2Fdojo%2Fsrc/__package__.js with error: [SyntaxError: XML tag name mismatch (expected HR), file: http://localhost:8080/Ajax/app?service=asset&path=%2Fdojo%2Fdojo.js, line: 96] DEBUG: failed loading /Ajax/app?service=asset&path=%2Fdojo%2Fsrc.js with error: [SyntaxError: XML tag name mismatch (expected HR), file: http://localhost:8080/Ajax/app?service=asset&path=%2Fdojo%2Fdojo.js, line: 96] DEBUG: failed loading /Ajax/app?service=asset&path=%2Fdojo%2F__package__.js with error: [SyntaxError: XML tag name mismatch (expected HR), file: http://localhost:8080/Ajax/app?service=asset&path=%2Fdojo%2Fdojo.js, line: 96] FATAL: Could not load 'dojo.widget.html.ContentPane'; last tried '__package__.js' DEBUG: failed loading /Ajax/app?service=asset&path=%2Fdojo%2Fsrc/widget/ContentPane.js with error: [Error: Could not load 'dojo.widget.html.ContentPane'; last tried '__package__.js', file: http://localhost:8080/Ajax/app?service=asset&path=%2Fdojo%2Fdojo.js, line: 84] DEBUG: failed loading /Ajax/app?service=asset&path=%2Fdojo%2F../tapestry/namespace.js with error: [TypeError: dojo.hostenv.moduleHasPrefix is not a function, file: http://localhost:8080/Ajax/app?service=asset&path=%2Fdojo%2Fdojo.js, line: 116]
-------------------------------------------------------------------

I have three files, Home.java, Home.page and Home.html:
-----------Home.html----------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html     jwcid="@Shell"
       title="Ajax"
       ajaxEnabled="true"
       browserLogLevel="DEBUG">
<head>
<title>Ajax</title>
</head>
<body jwcid="@Body">
   <div id="myFavoriteDiv">Big brother is watching you.</div>
</body>
</html>
-----------------------------

------------Home.page------
<?xml version="1.0"?>
<!DOCTYPE page-specification PUBLIC
"-//Apache Software Foundation//Tapestry Specification 4.1//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_1.dtd";>
<page-specification class="test.ttdev.ajax.Home">
</page-specification>
-----------------------------

-----------Home.java--------
package test.ttdev.ajax;

import org.apache.tapestry.html.BasePage;
import org.apache.tapestry.annotations.EventListener;
// org.apache.tapestry.event.*;

public abstract class Home extends BasePage{
   @EventListener(elements = "myFavoriteDiv", events = "onmouseover")
   public void watchText()
   {
    System.out.println("Mouse over myFavoriteDiv");
   }
  }
------------------------------


anyone knows what is wrong??? i tried everything (i guess)... but i keep getting that error. Tapestry thing works fine, but when i try tu use ajax i cant.
Thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to