Hi there,

I'm not on the list, just new to Velocity and liking it a LOT--especially
the Struts implementation!  It really takes care of many of the problems
inherent in web designers trying to make sense of STRUTS tag-filled JSP
code.

One question--I'm running into problems reading velocity (1.3) properties
in a WAR file.  When deploying in Tomcat 4.1/JBOSS 3, I get this error:

10:33:13,043 INFO [Engine] Unable to read Velocity configuration file:
java.io. FileNotFoundException: \velocity.properties (The system cannot
find the file specified)

I've run into similar problems with loading log4j properties in the past,
and found a similar issue in VelocityServlet::loadConfiguration():

        if ( propsFile != null )
        {
            String realPath = getServletContext().getRealPath(propsFile);

            if ( realPath != null )
            {
                propsFile = realPath;
            }

            p.load( new FileInputStream(propsFile) );
        }

>From a WAR in Tomcat, getServletContext().getRealPath(...) returns *null*.
The appropriate way to load properties appears to be via getResource()
instead of getRealPath().

Is anyone working on this or is there some other non-code workaround?  If
not, I don't mind hopping on board and taking it on, but it does appear
from your web site that development has slowed (i.e., 1.3.1 RC2 has been
out since last July).  Are you planning a forthcoming release soon into
which this sort of change might possibly be incorporated?

-Mike


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to