velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paulo Eduardo Azevedo Silveira <p...@linux.ime.usp.br>
Subject odd problem with FileResourceLoader
Date Tue, 06 Aug 2002 15:03:03 GMT
Hello Guys

I have a webapp, using a single VelocityServlet.
(velocity 1.2, using dep.jar, jdk 1.4)

Here at home, it runs fine in tomcat 4.0.4 standalone.

When I send it to my server (redhat), it inits fine, but the
ResourceManager does not find any of the templates.

I ve configured the  "file.resource.loader.path" from the properties file
and from the loadProperties overwritten method.

In another Servlet, I print Velocity.getProperty("file.resource.loader.path") and it has the
value that I need(a vector of paths). I thought it could be a permission
problem, but if I do as the following:

File f = new File("/the/template/dir", "template.vm");
FileInputStream fis = new FileInputStream(f.getAbsolutePath());

and prints it, it works perfectly... Note that this is the EXACT way that
FileResourceLoader looks for the file in each path.

The exception is being thrown in ResourceManager  line 428 (velocity 1.2),
which is after 
trying to look for the file in all paths, and you have a null inputStream.

ANY ideas? I am really getting crazy, it has been two days now...

Thanks a lot

paulo

---------
"The software required Win95 or better, so I installed Linux."
"Standards are good! Let us have a LOT of them!"
Paulo Eduardo A. Silveira   <peas@linux.ime.usp.br>
UIN: 5142673   www.paulo.com.br


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


Mime
View raw message