You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Rana Asif Rubbani <ra...@adamsoftintl.com> on 2004/04/28 19:26:25 UTC

Configuration Problem in Oracle9iAs

Hi

I'm trying to run velocity in Oracle9iAs and i'm quite new to velocity
world.

The directory structure my application in Oracle9iAs is

all jsp/velocity templates are in
D:/oracle9ias/j2ee/home/applications/doccomply/doccomply/

I'm using a javascript file lets say test.js in a velocity template but when
html is rendered the js file is not picked up and it gives a javascript
error.

e.g. the code for inclusion of javacript is

<script scr="test.js" language="JavaScript"></script>

but when i give absolute url or path in the template like

<script scr="$url/test.js" language="JavaScript"></script>

where url = http://jupiter:7778/doccomply

it works fine...
I'm afraid that when thi s code will be deployed on testing or production
servers the url will change and my code will not work.
Different users access the same application in production using different
URLs.

Please advise that why the script files are not being picked up while in a
template or i have to access them using absolute URLs or paths.
the templates are being picked up fine but not the js files in them.


regards
Rana Asif Rubbani


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Configuration Problem in Oracle9iAs

Posted by Mike Kienenberger <mk...@alaska.net>.
Rana Asif Rubbani <ra...@adamsoftintl.com> wrote:
> Please advise that why the script files are not being picked up while in a
> template or i have to access them using absolute URLs or paths.
> the templates are being picked up fine but not the js files in them.


This is an Oracle Application Server question, not a velocity question.

However, using OAS 10g, Velocity, and struts, here is an example of how I do 
it for a ccs file.

	<link rel=stylesheet 
href="${request.getScheme()}://${request.getServerName()}:${request.getServerPort()}${request.getContextPath()}/img/ebpp.css" 
type="text/css">

This assumes that /img is at the same level (ie, main level) in your war 
file as /WEB-INF.


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org