cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Forge <fo...@neonics.com>
Subject [c2] XSPUtil.java
Date Thu, 15 Mar 2001 03:11:56 GMT

Hi there,

Is this a bug:

The following function returns either the filename if 'filename' is
absolute, or the path to the directory where cocoon.xconf and WEB-INF
reside:

---------------------
    public static String relativeFilename(String filename,
HttpServletRequest request,
        ServletContext context) throws IOException {
            File file = new File(filename);
            if (file.isAbsolute()) {
                return filename;
            }
            return NetUtils.getPath(context.getResource(filename).toExternalForm
());
    }
--------------------

I myself have a htdocs dir which is the home for cocoon and contains
WEB-INF, cocoon.xconf and sitemap.xmap.

I also have a subdirectory 'dlc' in which the following xml file
resides:

<snippet>
  <util:include-file name="bla.xml"/>
</snippet>


The errormessage from the exception thrown in the code that is expanded
from the util:include-file tag, the directory given is

/path/to/htdocs

and not even 

/path/to/htdocs/dlc

or even

/path/to/htdocs/dlc/bla.xml, which of course does not occur since the file
exists in that place.

Can someone please look at this?

Thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message