cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maha Al-Yahya <...@Cs.Nott.AC.UK>
Subject RE: Image display
Date Mon, 17 Jun 2002 21:12:40 GMT
Hi Beth,

Thank you for your advice. All good now.
Looking at the core.log, I have realized that the request to cocoon was:
REQUEST:/cocoon/myapps/home/cocoon-built.gif
and not
/cocoon/myapps/cocoon-built.gif as i expected so i need to be up one level
and changed
<img src="cocoon-built.gif"/> to <img src="../cocoon-built.gif"/>
everything worked fine. The core.log was very useful.

Many thanks,
mma

On Mon, 17 Jun 2002, Naquin, Beth wrote:

> It seems like a problem with the relative path to the image.  You can check
> sitemap.log and core.log to see what is the actual path & filename of the
> .gif file that you are requesting.  Then compare that to where you know the
> file is actually located (ie make sure what comes after REQUEST: really
> points to the location of your .gif file).
> 
> 
> You should see something like this in core.log:
> 
> DEBUG   (2002-06-17) 12:35.04:205
> [core](/cocoon/otda_1/images/header/tomcat_header.gif)
> HttpProcessor[8080][3]/Cocoon: DEBUGGING INFORMATION:
> REQUEST: /cocoon/otda_1/images/header/tomcat_header.gif
> 
> CONTEXT PATH: /cocoon
> SERVLET PATH: /otda_1/images/header/tomcat_header.gif
> PATH INFO: null
> 
> 
> 
> For example, I have a stylesheet located in
> /cocoon/mywebapp/stylesheet/stysheet.xsl  In that xsl file I write
> <img src="../../images/header/tomcat_header.gif"/>
> 
> The gif file is located in /cocoon/mywebapp/images/header/tomcat_header.gif
> 
> sitemap entry (which is a subsitemap of the main cocoon sitemap):
> 
> <map:match pattern="**images/**.gif">
>     <map:read src="images/{2}.gif" mime-type="image/gif"/>
> </map:match>
> 
> -----Original Message-----
> From: Maha Al-Yahya [mailto:mma@Cs.Nott.AC.UK]
> Sent: Monday, June 17, 2002 11:58 AM
> To: cocoon-users@xml.apache.org; Abhishek.Goel@morganstanley.com
> Subject: Re: Image display
> 
> 
> Hi Abhisheck,
> 
> Thanks for your reply. I have tried what you mentioned but with no
> success. If I change the match in the sitemap to:
> <map:match pattern="*.gif">
>   <map:read src="resources/images/{1}.gif" mime-type="image/gif"/>
> </map:match>
> then If I request :
> http://localhost:8080/cocoon/myapps/cocoon-built.gif the file is served 
> and I can see it in the browser. But when I put the <img> tag in a
> stylesheet nothing is displayed. I wonder why?
> 
> Cheers,
> mma
> 
> On Mon, 17 Jun 2002, Abhishek Goel wrote:
> 
> > hi,
> > suppose you are typing the url
> > http://localhost:8080/images/cocoon-built.gif
> > so when you say "**" the value assigned to {1} will be=
> > images/cocoon-built.gif
> > which according to your case will become
> > src="resources/images/{1}.gif"= "resources/images/images/cocoon-built.gif"
> > 
> > so i think src should be resource/{1}.gif
> > i hope this works.
> > regards
> > Abhishek Goel
> > 
> > Maha M Al-Yahya wrote:
> > 
> > > Hello,
> > >   I'm new to cocoon and I'm trying to display an image which i have
> > > included in a stylesheet which looks like this:
> > > <img alt="Built with Apache Cocoon" src="images/cocoon-built.gif"/>
> > > The image file is located in cocoonhome/myapps/resources/images/
> > >
> > > I have added the following matcher (as found in cocoon-useres archive)
> > > to sitemap.xmap file
> > > <map:match pattern="images/**.gif">
> > >     <map:read src="resources/images/{1}.gif" mime-type="image/gif"/>
> > > </map:match>
> > >
> > > but with no success! I only see the "alt" message.
> > > Can anyone help?
> > >
> > > Cheers,
> > > mma
> > >
> > > ---------------------------------------------------------------------
> > > Please check that your question  has not already been answered in the
> > > FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> > >
> > > To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> > > For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> > 
> > 
> > ---------------------------------------------------------------------
> > Please check that your question  has not already been answered in the
> > FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> > 
> > To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> 


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


Mime
View raw message