[prev in list] [next in list] [prev in thread] [next in thread]
List: velocity-user
Subject: RE: ResourceManager : unable to find resource '/XXX.vm' in any re
From: David You <David.You () hds ! com>
Date: 2002-12-23 23:38:44
[Download RAW message or body]
Putting *.vm files into WEB-INF directory does not make sense because where
WEB_INF will be located is highly web server dependent,
That rule out use Jar or File resource loader.
If you want to put *.vm within your WEB-INF, do what I do: Zip it in a jar
file and put it in the lib directory of WEB-INF, and use classloader to read
it. Do put the velocity jar file into the lib directory also though.
While in a development environment, do what ever is the most convienent way
to you.
David
-----Original Message-----
From: otisg [mailto:otisg@ureach.com]
Sent: Monday, December 23, 2002 2:11 PM
To: velocity-user@jakarta.apache.org
Subject: ResourceManager : unable to find resource '/XXX.vm' in any
resource loader.
Hello,
While trying to get my first Struts-based
web app working with Velocity I'm
encountering errors such as this one:
[2002/12/23 16:52:06] Velocity [error]
ResourceManager : unable to find resource
'/login.vm' in any resource loader.
It looks like I have something
misconfigured. Here is an excerpt from my
WAR file:
3806 Mon Dec 23 16:30:14 EST 2002
WEB-INF/struts-config.xml
4356 Mon Dec 16 17:36:06 EST 2002
WEB-INF/velocity.properties
567 Mon Dec 23 16:05:14 EST 2002
WEB-INF/toolbox.xml
492 Sun Nov 24 21:39:42 EST 2002
WEB-INF/VM_global_library.vm
1152 Mon Dec 23 16:27:26 EST 2002
WEB-INF/login.vm
1152 Mon Dec 23 16:27:26 EST 2002
WEB-INF/view/login.vm
(I put login.vm in both dirs above, not sure
which is better, but neither works yet)
My web.xml contains:
<!-- Define Velocity template compiler -->
<servlet>
<servlet-name>ViewServlet</servlet-name>
<servlet-class>org.apache.velocity.tools.view.servlet.VelocityViewServlet</s
ervlet-class>
<init-param>
<param-name>toolbox</param-name>
<param-value>/WEB-INF/toolbox.xml</param-value>
</init-param>
<init-param>
<param-name>properties</param-name>
<param-value>/WEB-INF/velocity.properties</param-value>
</init-param>
<load-on-startup>10</load-on-startup>
</servlet>
<!-- Map *.vm files to Velocity -->
<servlet-mapping>
<servlet-name>ViewServlet</servlet-name>
<url-pattern>*.vm</url-pattern>
</servlet-mapping>
As far as I understand this Struts and
Velocity setup, there is nothing in
struts-config.xml that could cause this error.
If there is something else I need to show,
please let me know - I'm not shy :)
Any help getting me off the ground is welcome.
Thanks,
"Icarus" (Otis, really)
________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag
--
To unsubscribe, e-mail:
<mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:velocity-user-help@jakarta.apache.org>
--
To unsubscribe, e-mail: <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic