velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tom...@netscape.net (Tomas Wredendal)
Subject RE: Properties File
Date Sun, 18 Jul 2004 22:32:31 GMT
Try this...
 
---8<----SampleServlet2.java----
    {
        /*
         *  get our properties file and load it
         */

//        String propsFile = config.getInitParameter(INIT_PROPS_KEY);
        String propsFile = config.getInitParameter("properties");        
        Properties p = new Properties();
        
        if ( propsFile != null )
        {
--->8----SampleServlet2.java----

-- 
Tomas

If ain't broken, don't fix it 


"Ken Wright" <kenton@ukonline.co.uk> wrote:

>Hi,
>
>I've scanned the archive and have found a similar post but no solution was
>posted.
>
>I am using Velocity 1.4 with Tomcat 4.1.30 on Windows XP Pro.
>
>I have no problems getting servlets to work - I have several running.
>
>I have followed the servlet examples included with the Velocity download. I
>can get "servlet_example1" to work without a problem.
>
>However, I can't get "servlet_example2" to work. I have used the
>velocity.properties file(s) included. No matter where I put the sample.vm
>template or the jar file, Tomcat's output notes that it can't find it.
>
>It's as if the properties file is loaded thus preventing autoconfiguration
>(sample.vm is not read from the root folder) but the path to the templates
>directory or jar is not read/found.
>
>Can anyone give me some suggestions to try?
>
>Many thanks,
>
>Ken
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

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


Mime
View raw message