velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "brian" <>
Subject RE: rendering velocity in websphere
Date Wed, 02 Jun 2004 23:32:44 GMT
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN" "">
<web-app id="WebApp">
	 <display-name>GLO Application</display-name>
     <description>This is the initial servlet.</description>

	 <display-name>velocity servlet</display-name>
     <description>This is the initial velocity servlet.</description>



      <session-config id="SessionConfig_1">
   <welcome-file-list id="WelcomeFileList_1">



entries in properties file:
# -------------------------------------------------------------------
#  V E L O C I T Y  S E R V I C E
# -------------------------------------------------------------------

services.VelocityService.earlyInit= true

# The location of Velocity configuration file, relative to webapp root
# These properties will override the default properties set by Velocity.
# You should specify the path to the templates directories as well as
# the path to the log file and they should also be relative to webapp

#services.VelocityService.template.extension=vm = VelocityPage
#services.VelocityService.default.layout = VelocityOnlyLayout
#services.VelocityService.default.error.screen = VelocityErrorScreen
#services.VelocityService.default.layout.template = Default.vm

# Filepath for error template, 
#  relative to web application root directory
tools.view.servlet.error.template = Error.vm

# Directory for layout templates, 
#  relative to web application root directory = layouts/

# Filepath of the default layout template 
#  relative to the layout directory 
#  NOT relative to the root directory of the webapp!
tools.view.servlet.layout.default.template =  Login.vm

# Set this to true to catch Velocity Errors and display them in the log
services.VelocityService.catch.errors = true


# global macros are in the /templates folder for your use
services.VelocityService.velocimacro.library = GlobalMacros.vm

# TurbineMacros are within the turbine jar and allow some nice page
building techniques
services.VelocityService.velocimacro.library = macros/TurbineMacros.vm

# Set the following line to true to cause velocity to automatically
# library macro files if they change.  This is useful for debugging.
services.VelocityService.velocimacro.library.autoreload = false

services.VelocityService.resource.loader = file
services.VelocityService.file.resource.loader.description = Velocity
File Resource Loader
services.VelocityService.file.resource.loader.class =
services.VelocityService.file.resource.loader.path =
services.VelocityService.file.resource.loader.cache = false
= 2

# Do not remove the class path loader lightly, it is used to load the
TurbineMacros from VelocityOnlyLayout
services.VelocityService.resource.loader = classpath
services.VelocityService.classpath.resource.loader.description =
Velocity Classpath Resource Loader
services.VelocityService.classpath.resource.loader.class =

-----Original Message-----
From: Nathan Bubna [] 
Sent: Wednesday, June 02, 2004 6:42 PM
To: Velocity Users List
Subject: Re: rendering velocity in websphere

brian said:
> I have read
> and

thanks, i feel much better now. :)

> I am trying to set
> the layout using #set($layout="Login.vm") at the top of my screen. I
> a "Unable to find resource 'layout/Default.vm'" error when I try to
> access the servlet from the browser. I even tried to change the
> layout value in the properties file.

ok, can you show us what your web.xml looks like?  it sounds like the
might be there.  also, if you have any custom velocity properties
(particularly pertaining to resource loaders or the layout servlet),
could you
include those snippets?

Nathan Bubna

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message