You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Zamek <za...@vili.pmmf.hu> on 2004/03/01 12:59:21 UTC

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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: getting mount point

Posted by Zamek <za...@vili.pmmf.hu>.
Hello All,

Thanks, it works well ...

On Monday 01 March 2004 13.21, Jan Hoskens wrote:
> 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" <za...@vili.pmmf.hu>
> To: <us...@cocoon.apache.org>
> 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: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org

-- 
udv,
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694


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


Re: getting mount point

Posted by Jan Hoskens <jh...@schaubroeck.be>.
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" <za...@vili.pmmf.hu>
To: <us...@cocoon.apache.org>
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: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


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


Re: Cocoon chapters for download

Posted by "grofcik.lan" <mg...@pflow.sk>.
Where could I find these books for free download?
Thanks in advance,
Martin

Andres Taborda wrote:

> Hello list,
>
> some user have more books of Cocoon for
> free dowmload.
>
> I have the intention of collection material on Cocoon
>
>
> Thanks very much
>
>
>> have been in contact with SAMS, the publisher of our Cocoon book. They
>> already provide a free download of Chapter 6 (A User's look at the 
>> Cocoon
>> Architecture). They have now agreed to provide Chapter 1 (An 
>> Introduction to
>> Internet Applications) as a free download. Chapter 1 basically 
>> details the
>> history of building Internet/Web applications and outlines why Cocoon 
>> is the
>> best choice when considering a platform today.
>>
>> Chapters 1 and 6 are available here:
>>
>> http://www.s-und-n.de/sunshine/ccos/CBA-Chapter1.pdf
>> http://www.s-und-n.de/sunshine/ccos/CBA-Chapter6.pdf
>>
>> Currently the SAMS/NewRiders Site only has chapter 6.
>>
>> Enjoy.
>>
>> Matthew
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>  
>>
>
>

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


Re: Cocoon chapters for download

Posted by Andres Taborda <at...@saludcolombiaeps.com.co>.
Hello list,

some user have more books of Cocoon for
free dowmload.

I have the intention of collection material on Cocoon


Thanks very much


>have been in contact with SAMS, the publisher of our Cocoon book. They
>already provide a free download of Chapter 6 (A User's look at the Cocoon
>Architecture). They have now agreed to provide Chapter 1 (An Introduction to
>Internet Applications) as a free download. Chapter 1 basically details the
>history of building Internet/Web applications and outlines why Cocoon is the
>best choice when considering a platform today.
>
>Chapters 1 and 6 are available here:
>
>http://www.s-und-n.de/sunshine/ccos/CBA-Chapter1.pdf
>http://www.s-und-n.de/sunshine/ccos/CBA-Chapter6.pdf
>
>Currently the SAMS/NewRiders Site only has chapter 6.
>
>Enjoy.
>
>Matthew
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>  
>


-- 
Cordialmente,

Andres Taborda 
Departamento de Sistemas
http://www.saludcolombiaeps.com.co
email:ataborda@saludcolombiaeps.com.co
SaludColombia E.P.S. - Una Sola Familia
Calle 5C # 43-05 Tequendama
Telefono : 57 (002) 551 04 89 - 57 (002) 551 04 90 Ext 119
Cali - Colombia



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


Re: Cocoon chapters for download

Posted by Andres Taborda <at...@saludcolombiaeps.com.co>.
Hello list,

some user have more books of Cocoon for
free dowmload.

I have the intention of collection material on Cocoon


Thanks very much


>have been in contact with SAMS, the publisher of our Cocoon book. They
>already provide a free download of Chapter 6 (A User's look at the Cocoon
>Architecture). They have now agreed to provide Chapter 1 (An Introduction to
>Internet Applications) as a free download. Chapter 1 basically details the
>history of building Internet/Web applications and outlines why Cocoon is the
>best choice when considering a platform today.
>
>Chapters 1 and 6 are available here:
>
>http://www.s-und-n.de/sunshine/ccos/CBA-Chapter1.pdf
>http://www.s-und-n.de/sunshine/ccos/CBA-Chapter6.pdf
>
>Currently the SAMS/NewRiders Site only has chapter 6.
>
>Enjoy.
>
>Matthew
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>  
>


-- 
Cordialmente,

Andres Taborda 
Departamento de Sistemas
http://www.saludcolombiaeps.com.co
email:ataborda@saludcolombiaeps.com.co
SaludColombia E.P.S. - Una Sola Familia
Calle 5C # 43-05 Tequendama
Telefono : 57 (002) 551 04 89 - 57 (002) 551 04 90 Ext 119
Cali - Colombia



Cocoon chapters for download

Posted by Matthew Langham <ml...@s-und-n.de>.
I have been in contact with SAMS, the publisher of our Cocoon book. They
already provide a free download of Chapter 6 (A User's look at the Cocoon
Architecture). They have now agreed to provide Chapter 1 (An Introduction to
Internet Applications) as a free download. Chapter 1 basically details the
history of building Internet/Web applications and outlines why Cocoon is the
best choice when considering a platform today.

Chapters 1 and 6 are available here:

http://www.s-und-n.de/sunshine/ccos/CBA-Chapter1.pdf
http://www.s-und-n.de/sunshine/ccos/CBA-Chapter6.pdf

Currently the SAMS/NewRiders Site only has chapter 6.

Enjoy.

Matthew


Cocoon chapters for download

Posted by Matthew Langham <ml...@s-und-n.de>.
I have been in contact with SAMS, the publisher of our Cocoon book. They
already provide a free download of Chapter 6 (A User's look at the Cocoon
Architecture). They have now agreed to provide Chapter 1 (An Introduction to
Internet Applications) as a free download. Chapter 1 basically details the
history of building Internet/Web applications and outlines why Cocoon is the
best choice when considering a platform today.

Chapters 1 and 6 are available here:

http://www.s-und-n.de/sunshine/ccos/CBA-Chapter1.pdf
http://www.s-und-n.de/sunshine/ccos/CBA-Chapter6.pdf

Currently the SAMS/NewRiders Site only has chapter 6.

Enjoy.

Matthew


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