Putting it in WEB-INF/ and refering to it as 
<span jwcid="@Script" script="wz_graphics.script" />
should work fine.

I had a very "funny" problem recently, where Tomcat could
not find a resource in WEB-INF when the app was defined
by a <Context> in server.xml. Moving the <Context> into
its own file helped in that instance - but I'm just guessing ...

> -----Original Message-----
> From: Peter Svensson [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 23, 2006 12:33 PM
> To: Tapestry users
> Subject: Script problems
> 
> 
> Hi!  I' trying to use any old script in a page.
> 
> I've usccessfully managed tu get some Tacos components 
> working, so I've had
> some headway in the JS department. However, Tacos is pretty 
> wrapped up and
> easy to use, so I can't manage to manually do anything 
> js<->tapestry on my
> own it seems.
> 
> I have read the Script dox at
> http://jakarta.apache.org/tapestry/tapestry/ComponentReference
> /Script.html
> and dutifully made a small script which I have put neatly 
> along the other
> files in my WEB-INF directoy.
> 
> I have tried to move the script file to the src directory.
> 
> I have tried to move the script file to its own subdirecotry
> 
> I have tried to copy something I saw from the tacos demo;
> 
> <script jwcid="@Any" type="text/javascript" src="ognl:baseURL +
> '/js/dojo/dojo.js'"></script>
> 
> But even though it works in the tacos demo, and the 
> Border.html where I
> found this has the same page class 
> (org.apache.tapestry.BaseComponent) as my
> own, I still get a cheery exception saying that baseURL() can 
> not be found.
> Aint life sweet.
> 
> I've tried doing funny dances in front of the computer.
> 
> I've tried to put the following (despite tha fact that the dox doesn't
> mention it) first in the Script file;
> 
> <?xml version="1.0"?>
> <!DOCTYPE script PUBLIC
>  "-//Howard Ship//Tapestry Script 1.1//EN"
>  "http://tapestry.sf.net/dtd/Script_1_1.dtd";>
> 
> Because I found i in an old email regarding scripts.
> 
> And, yes, I have the
> <script>
>   <body>
> <![CDATA[
> 
> stuff in the beginning.
> 
> No matter what I do, I still get
> 
> 
>   org.apache.hivemind.ApplicationRuntimeException  Unable to 
> parse script
> context:/WEB-INF/wz_graphics.script.  location:
> context:/WEB-INF/wz_graphics.script
> org.apache.tapestry.util.xml.DocumentParseException  Unable 
> to find resource
> context:/WEB-INF/wz_graphics.script.  location:
> context:/WEB-INF/wz_graphics.script
> At first I tried naively to just refer to the script the 
> "usual" way as a
> .js file in the header or body but Noooooo, that would have 
> been too easy by
> far.
> 
> Does anyone know _where_ scripts should be put to work?
> 
> Sorry if I seems just a little bit out of my mammalian 
> protuberances at the
> moment, but I feel that it is currently called for.
> 
> Chores,
> PS
> 

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

Reply via email to