I don't know if there's an input module to do that, but if you need a file
or dir within your home dir (so an absolute path to your file/dir) then you
can also use the resolver like this:
<xsp:structure>
<xsp:include>org.apache.excalibur.source.Source</xsp:include>
<xsp:include>java.net.URL</xsp:include>
<xsp:include>org.apache.cocoon.ResourceNotFoundException</xsp:include>
</xsp:structure>
<xsp:logic>
try{
Source inputSource = this.resolver.resolveURI("my_relative_dir"); //
so if this variable is empty, it will resolve to your home dir
c:/whateveryourdiris/ (containing your sitemap.xmap)
String systemId = inputSource.getURI();
File f = new File(new URL(systemId).getFile());
}
catch( Exception e)
{
throw new ResourceNotFoundException();
}
</xsp:logic>
kind regards,
Jan
----- Original Message -----
From: "Zamek" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 01, 2004 12:59 PM
Subject: getting mount point
> Hi All,
>
> I use my cocoon app by my home directory like
> http://server/~zamek/app/params...
>
> And I would like to get mount point in my xsp page:
>
> <map:match pattern="do-delete-**">
> <map:generate src="java/delete.xsp" type="serverpages">
> <map:parameter name="file" value="{1}"/>
> <map:parameter name="rp" value="{realpath:/}"/>
> </map:generate>
> <map:serialize/>
> </map:match>
>
> Unfortunately realpath doesn't get right path, because it point to
cocoon's
> entry in my system.
>
> And I try to pass cocoon:/, but I can get an exception. Are there a
> predefined "cocoon-protocol" variable in xsp?
> So how can I get mount point?
>
> --
> thx,
> Zoltan Zidarics programmer
> PTE University Pecs, Hungary
> icq: 43288694
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]