You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Piroumian, Konstantin" <KP...@flagship.ru> on 2001/01/31 17:42:57 UTC

Is this a bug in FP taglib?

Hi, all!

I use Tomcat 3.1, Cocoon 1.8, WinNT 4.0

I have an application context in Tomcat with path="" (the root of server)
and have a welcome file - /xml/login.xml under that context path. So I can
access my application simply by: http://localhost/

The problem is in that that I use FP taglib in my login.xml like this:
...
       <fp:resource-file>/repository.xml</fp:resource-file>
...

As you can see the path points to the <docBase>/repository.xml but I get an
exception that:
file <docBase>/xml/repository.xml not found.*
Why does it go to the current dirrectory instead of the root?
* - <docBase> is the real path to the application directory.

Thank you.

Konstantin Piroumian.





Re: Bug in FP taglib/Cocoon?

Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
I found out in sources that FP taglib uses xsp.XSPUtils.relativeFileName()
which uses Utils.getBasename() in it.
So, when I try to get a file by its absolute path: /storage/file.xml it
tries to find it not from the document base of the application Context, as I
think it must be.
I use FP from a file in subdirectory of the docBase, e.g.: /xml/login.xml
and it constructs the full path to the file as:
<docBase>/xml/storage/login.xml instead of <docBase>/storage/login.xml

Is that a bug in Cocoon or maybe I do something wrong?

> I use Tomcat 3.1, Cocoon 1.8, WinNT 4.0
>
> I have an application context in Tomcat with path="" (the root of server)
> and have a welcome file - /xml/login.xml under that context path. So I can
> access my application simply by: http://localhost/
>
> The problem is in that that I use FP taglib in my login.xml like this:
> ...
>        <fp:resource-file>/repository.xml</fp:resource-file>
> ...
>
> As you can see the path points to the <docBase>/repository.xml but I get
an
> exception that:
> file <docBase>/xml/repository.xml not found.*
> Why does it go to the current dirrectory instead of the root?
> * - <docBase> is the real path to the application directory.
>
> Thank you.
>
> Konstantin Piroumian.
>
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>