You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bogdan Cirstea <b....@finsiel.ro> on 2002/04/24 16:30:24 UTC

image problem

hi! i have a new problem: i use xsp and xsl to generate a page. on this page
i have a table and in some fields, i have to put images. for that, in xsl
file i used:
<img src="/src/web/img/img4.gif"/>. but nothing is displayed. i think that
the problem is from the path. how can i determine the corect path ?

my structure of my application is:
estuff
    -src
        -web
            -xsp
                home.xsp
            -stylesheets
                home.xsl
            -img
                img4.gif

in sitemap.xmap i have :
 <map:match pattern="">
        <map:redirect-to session="false" uri="home"/>
      </map:match>

      <map:match pattern="home">
        <map:generate type="serverpages" src="src/web/xsp/home.xsp"/>
        <map:transform type="xslt" src="src/web/stylesheets/home.xsl">
          <map:parameter name="use-request-parameters" value="true"/>
          <map:parameter name="base-url" value="/estuff"/>
        </map:transform>
        <map:serialize/>
    </map:match>

i accesed the application localhost:8080/estuff
in home.xsl i put <img src="src/web/img/img4.gif"/>
an nothing happens.

anybody could help me?
tks a lot



---------------------------------------------------------------------
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>


Re: image problem

Posted by KOZLOV Roman <r-...@opencascade.com>.
And it's not clear, do you finally use absolute or relative path, i.e. /src/...
or src/....
Roman

Paul Pattison wrote:

> Do you have a '**.gif' matcher in your sitemap?  I'm still a bit of a
> newbie, but I'm pretty sure you need this in your sitemap.  It would look
> something like this:
>
> <map:match pattern="images/**.gif">
>   <map:read mime-type="image/gif" src="resources/images/{1}.gif"/>
> </map:match>
>
> Hope that helps,
>
> Paul
>
> -----Original Message-----
> From: Bogdan Cirstea [mailto:b.cirstea@finsiel.ro]
> Sent: 24 April 2002 10:30
> To: cocoon-users@xml.apache.org
> Subject: image problem
>
> hi! i have a new problem: i use xsp and xsl to generate a page. on this page
> i have a table and in some fields, i have to put images. for that, in xsl
> file i used:
> <img src="/src/web/img/img4.gif"/>. but nothing is displayed. i think that
> the problem is from the path. how can i determine the corect path ?
>
> my structure of my application is:
> estuff
>     -src
>         -web
>             -xsp
>                 home.xsp
>             -stylesheets
>                 home.xsl
>             -img
>                 img4.gif
>
> in sitemap.xmap i have :
>  <map:match pattern="">
>         <map:redirect-to session="false" uri="home"/>
>       </map:match>
>
>       <map:match pattern="home">
>         <map:generate type="serverpages" src="src/web/xsp/home.xsp"/>
>         <map:transform type="xslt" src="src/web/stylesheets/home.xsl">
>           <map:parameter name="use-request-parameters" value="true"/>
>           <map:parameter name="base-url" value="/estuff"/>
>         </map:transform>
>         <map:serialize/>
>     </map:match>
>
> i accesed the application localhost:8080/estuff
> in home.xsl i put <img src="src/web/img/img4.gif"/>
> an nothing happens.
>
> anybody could help me?
> tks a lot
>
> ---------------------------------------------------------------------
> 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>
>
> ---------------------------------------------------------------------
> 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>


---------------------------------------------------------------------
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>


RE: image problem

Posted by Paul Pattison <pa...@76design.com>.
Do you have a '**.gif' matcher in your sitemap?  I'm still a bit of a
newbie, but I'm pretty sure you need this in your sitemap.  It would look
something like this:

<map:match pattern="images/**.gif">
  <map:read mime-type="image/gif" src="resources/images/{1}.gif"/>
</map:match>

Hope that helps,

Paul


-----Original Message-----
From: Bogdan Cirstea [mailto:b.cirstea@finsiel.ro]
Sent: 24 April 2002 10:30
To: cocoon-users@xml.apache.org
Subject: image problem


hi! i have a new problem: i use xsp and xsl to generate a page. on this page
i have a table and in some fields, i have to put images. for that, in xsl
file i used:
<img src="/src/web/img/img4.gif"/>. but nothing is displayed. i think that
the problem is from the path. how can i determine the corect path ?

my structure of my application is:
estuff
    -src
        -web
            -xsp
                home.xsp
            -stylesheets
                home.xsl
            -img
                img4.gif

in sitemap.xmap i have :
 <map:match pattern="">
        <map:redirect-to session="false" uri="home"/>
      </map:match>

      <map:match pattern="home">
        <map:generate type="serverpages" src="src/web/xsp/home.xsp"/>
        <map:transform type="xslt" src="src/web/stylesheets/home.xsl">
          <map:parameter name="use-request-parameters" value="true"/>
          <map:parameter name="base-url" value="/estuff"/>
        </map:transform>
        <map:serialize/>
    </map:match>

i accesed the application localhost:8080/estuff
in home.xsl i put <img src="src/web/img/img4.gif"/>
an nothing happens.

anybody could help me?
tks a lot



---------------------------------------------------------------------
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>


---------------------------------------------------------------------
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>