You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by daljeetsingh <da...@softhome.net> on 2001/07/03 12:01:30 UTC

Re[2]: how to use custom velocity.properties

Do i have to add this setting for the servlets that extend VelocityServlet?

What I want to do is tell velocity to use a custom properties file for
all the Velocity related class files.

One other way is to extend the VelocityServlet in one of the classes,
add this class to web.xml and extend this class further on.

Would that be the right approach?

Re: how to use custom velocity.properties

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
daljeetsingh wrote:
> 
> Do i have to add this setting for the servlets that extend VelocityServlet?
> 
> What I want to do is tell velocity to use a custom properties file for
> all the Velocity related class files.
> 
> One other way is to extend the VelocityServlet in one of the classes,
> add this class to web.xml and extend this class further on.
> 
> Would that be the right approach?

In order to use Velocity in the servlet environment, either your servlet
needs to extend VelocityServlet, or your servlet needs to do most of the
things that VelocityServlet does.

So it's easier to extend VelocityServlet.

Did you review the servlet_example2 and servlet_example2 in the examples
directory in the distribution?

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!