Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Forrest: User

PDF not working correctly in deployed WAR file on Tomcat

 

 

Forrest user RSS feed   Index | Next | Previous | View Threaded


steve.odlind at btinternet

Feb 5, 2008, 9:59 AM

Post #1 of 24 (935 views)
Permalink
PDF not working correctly in deployed WAR file on Tomcat

Hello all,

I am hoping you can help me with a Forrest/Tomcat problem.

I am running Forrest 0.8, and am trying to deploy a WAR file on Tomcat. The problem is that PDFs get stripped of their images, and only text is displayed.

I can't get PDFs to display at all by deploying the Webapp on Tomcat. I have read http://issues.apache.org/jira/browse/FOR-735, and followed the advice, but cannot get PDFs to be displayed at all.

So, is there an update to this already-known-problem? I am half of the way there with WAR files, I just need to get the images displayed as well.

Many thanks,

Steve Odlind


mark.o.miller at gmail

Feb 5, 2008, 12:54 PM

Post #2 of 24 (921 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

Steve,

When you do 'forrest run' and have your site served by jetty - do you see
images in your PDFs then?

Where are you placing your images in the src file structure? What type of
file image are you trying to include? Just wondering if you have a more
general issue than what you describe.

Mark

On 2/5/08, Steve Odlind <steve.odlind [at] btinternet> wrote:
>
> Hello all,
>
> I am hoping you can help me with a Forrest/Tomcat problem.
>
> I am running Forrest 0.8, and am trying to deploy a WAR file on Tomcat.
> The problem is that PDFs get stripped of their images, and only text is
> displayed.
>
> I can't get PDFs to display at all by deploying the Webapp on Tomcat. I
> have read http://issues.apache.org/jira/browse/FOR-735, and followed the
> advice, but cannot get PDFs to be displayed at all.
>
> So, is there an update to this already-known-problem? I am half of the way
> there with WAR files, I just need to get the images displayed as well.
>
> Many thanks,
>
> Steve Odlind
>


crossley at apache

Feb 5, 2008, 3:32 PM

Post #3 of 24 (921 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

Mark Miller wrote:
> Steve,
>
> When you do 'forrest run' and have your site served by jetty - do you see
> images in your PDFs then?
>
> Where are you placing your images in the src file structure? What type of
> file image are you trying to include? Just wondering if you have a more
> general issue than what you describe.

Good questions Mark. We need to know if it works in 'forrest run'.

Also see the demo in the forrest seed sample site. Try building
and deploying its WAR. There are some general issues with
placement of source images.
http://issues.apache.org/jira/browse/FOR-635

More below ...

> Steve Odlind wrote:
> >
> > Hello all,
> >
> > I am hoping you can help me with a Forrest/Tomcat problem.
> >
> > I am running Forrest 0.8, and am trying to deploy a WAR file on Tomcat.
> > The problem is that PDFs get stripped of their images, and only text is
> > displayed.
> >
> > I can't get PDFs to display at all by deploying the Webapp on Tomcat. I
> > have read http://issues.apache.org/jira/browse/FOR-735, and followed the
> > advice, but cannot get PDFs to be displayed at all.

FOR-735 was closed prior to 0.8 release, so that should be fine.

> > So, is there an update to this already-known-problem? I am half of the way
> > there with WAR files, I just need to get the images displayed as well.

You don't say, but have you followed the FAQ:
http://forrest.apache.org/docs/faq.html#pdf_images
... but i suppose you would have or images would
also be missing in 'forrest run' mode.

-David


steve.odlind at btinternet

Feb 6, 2008, 2:32 AM

Post #4 of 24 (920 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

Images are displayed fine in PDFs served by Jetty.

I am placing the images in src/documentation/resources/images.

I am trying to include SVGs and PNGs. Both these file types work fine in
PDFs served by Jetty when in the above location.


Mark Miller-8 wrote:
>
> Steve,
>
> When you do 'forrest run' and have your site served by jetty - do you see
> images in your PDFs then?
>
> Where are you placing your images in the src file structure? What type of
> file image are you trying to include? Just wondering if you have a more
> general issue than what you describe.
>
> Mark
>
> On 2/5/08, Steve Odlind <steve.odlind [at] btinternet> wrote:
>>
>> Hello all,
>>
>> I am hoping you can help me with a Forrest/Tomcat problem.
>>
>> I am running Forrest 0.8, and am trying to deploy a WAR file on Tomcat.
>> The problem is that PDFs get stripped of their images, and only text is
>> displayed.
>>
>> I can't get PDFs to display at all by deploying the Webapp on Tomcat. I
>> have read http://issues.apache.org/jira/browse/FOR-735, and followed the
>> advice, but cannot get PDFs to be displayed at all.
>>
>> So, is there an update to this already-known-problem? I am half of the
>> way
>> there with WAR files, I just need to get the images displayed as well.
>>
>> Many thanks,
>>
>> Steve Odlind
>>
>
>

--
View this message in context: http://www.nabble.com/PDF-not-working-correctly-in-deployed-WAR-file-on-Tomcat-tp15295911p15306457.html
Sent from the Apache Forrest - Users mailing list archive at Nabble.com.


steve.odlind at btinternet

Feb 6, 2008, 2:38 AM

Post #5 of 24 (920 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

> Also see the demo in the forrest seed sample site. Try building
> and deploying its WAR. There are some general issues with
> placement of source images.
> http://issues.apache.org/jira/browse/FOR-635

I will try to deploy the seed site's WAR file.

I don't think my problem is related to FOR-635 as images display fine in
PDFs served by Jetty ('forrest run').


> Steve Odlind wrote:
> >
> > Hello all,
> >
> > I am hoping you can help me with a Forrest/Tomcat problem.
> >
> > I am running Forrest 0.8, and am trying to deploy a WAR file on Tomcat.
> > The problem is that PDFs get stripped of their images, and only text is
> > displayed.
> >
> > I can't get PDFs to display at all by deploying the Webapp on Tomcat. I
> > have read http://issues.apache.org/jira/browse/FOR-735, and followed the
> > advice, but cannot get PDFs to be displayed at all.

> FOR-735 was closed prior to 0.8 release, so that should be fine.

> > So, is there an update to this already-known-problem? I am half of the
> way
> > there with WAR files, I just need to get the images displayed as well.

> You don't say, but have you followed the FAQ:
> http://forrest.apache.org/docs/faq.html#pdf_images
> ... but i suppose you would have or images would
> also be missing in 'forrest run' mode.

Yes, I have followed that FAQ. Images are not missing in 'forrest run' mode.



--
View this message in context: http://www.nabble.com/PDF-not-working-correctly-in-deployed-WAR-file-on-Tomcat-tp15295911p15306463.html
Sent from the Apache Forrest - Users mailing list archive at Nabble.com.


johannes.schaefer at uidesign

Feb 6, 2008, 4:55 AM

Post #6 of 24 (919 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

You'll probably need to include the jimi.jar (or JAI) somehow in the
WAR (or tomcat) -- does anyone know how and where?

Johannes

SteveOdlind schrieb:
> Images are displayed fine in PDFs served by Jetty.
>
> I am placing the images in src/documentation/resources/images.
>
> I am trying to include SVGs and PNGs. Both these file types work fine in
> PDFs served by Jetty when in the above location.
>
>
> Mark Miller-8 wrote:
>> Steve,
>>
>> When you do 'forrest run' and have your site served by jetty - do you see
>> images in your PDFs then?
>>
>> Where are you placing your images in the src file structure? What type of
>> file image are you trying to include? Just wondering if you have a more
>> general issue than what you describe.
>>
>> Mark
>>
>> On 2/5/08, Steve Odlind <steve.odlind [at] btinternet> wrote:
>>> Hello all,
>>>
>>> I am hoping you can help me with a Forrest/Tomcat problem.
>>>
>>> I am running Forrest 0.8, and am trying to deploy a WAR file on Tomcat.
>>> The problem is that PDFs get stripped of their images, and only text is
>>> displayed.
>>>
>>> I can't get PDFs to display at all by deploying the Webapp on Tomcat. I
>>> have read http://issues.apache.org/jira/browse/FOR-735, and followed the
>>> advice, but cannot get PDFs to be displayed at all.
>>>
>>> So, is there an update to this already-known-problem? I am half of the
>>> way
>>> there with WAR files, I just need to get the images displayed as well.
>>>
>>> Many thanks,
>>>
>>> Steve Odlind
>>>
>>
>

--
User Interface Design GmbH, Ludwigsburg, Germany
Phone/Fax +49 7141 37700-46/-99, Mobile +49 170 4914567
E-mail johannes.schaefer [at] uidesign * www.uidesign.de

Offices:
Martin-Luther-Straße 57-59, D-71636 Ludwigsburg
Truderinger Strasse 330, D-81825 Muenchen
Friedrichsring 46, D-68161 Mannheim
Hansastraße 7-11, 44137 Dortmund

Legal information according to EHUG:
User Interface Design GmbH; Managing Directors: Dr. Claus Goerner,
Franz Koller; Head office: Ludwigsburg; Commercial register of the
local court of Stuttgart, Germany, HRB 205519


crossley at apache

Feb 6, 2008, 4:18 PM

Post #7 of 24 (920 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

Johannes Schaefer wrote:
>
> You'll probably need to include the jimi.jar (or JAI) somehow in the
> WAR (or tomcat) -- does anyone know how and where?

I just checked via our forrest seed site. Yes the jimi library
does get added to the *.war if it is present in $FORREST_HOME/lib/optional
as recommended.

I don't have time to try the war in a Tomcat. Steve is trying that.

-David


steve.odlind at btinternet

Feb 7, 2008, 3:39 AM

Post #8 of 24 (920 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

>I just checked via our forrest seed site. Yes the jimi library
>does get added to the *.war if it is present in $FORREST_HOME/lib/optional
>as recommended.

I checked my WAR file and jimi.jar is included.

>I don't have time to try the war in a Tomcat. Steve is trying that.

Images are still missing from PDFs when the 'forrest seed' WAR file is
deployed on Tomcat.

-Steve

--
View this message in context: http://www.nabble.com/PDF-not-working-correctly-in-deployed-WAR-file-on-Tomcat-tp15295911p15332087.html
Sent from the Apache Forrest - Users mailing list archive at Nabble.com.


thorsten at apache

Feb 7, 2008, 1:58 PM

Post #9 of 24 (920 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

On Thu, 2008-02-07 at 03:39 -0800, SteveOdlind wrote:
> >I just checked via our forrest seed site. Yes the jimi library
> >does get added to the *.war if it is present in $FORREST_HOME/lib/optional
> >as recommended.
>
> I checked my WAR file and jimi.jar is included.
>
> >I don't have time to try the war in a Tomcat. Steve is trying that.
>
> Images are still missing from PDFs when the 'forrest seed' WAR file is
> deployed on Tomcat.

Please do the following:
- request instead of FILE.pdf FILE.fo
e.g. http://localhost:8080/my-project/samples-b/ascii-art.fo
- search for fo:external-graphic and copy the tag here in this list.
e.g. <fo:external-graphic
src="context:///project/src/documentation/content/xdocs/samples-b/cocoon-pyramid.png"/>

This way we/you can see the location referenced and whether they exist
in this location.

salu2

>
> -Steve
>
--
Thorsten Scherler thorsten.at.apache.org
Open Source Java consulting, training and solutions


steve.odlind at btinternet

Feb 8, 2008, 2:57 AM

Post #10 of 24 (922 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

Thorsten Scherler wrote:
>
>
>>Please do the following:
>>- request instead of FILE.pdf FILE.fo
>>e.g. http://localhost:8080/my-project/samples-b/ascii-art.fo
>>- search for fo:external-graphic and copy the tag here in this list.
>>e.g. <fo:external-graphic
>>src="context:///project/src/documentation/content/xdocs/samples-b/cocoon-pyramid.png"/>
>
>>This way we/you can see the location referenced and whether they exist
>>in this location.
>
>

The external-graphic tag is:

<fo:external-graphic
src="context:/\/project/src/documentation/content/xdocs/samples/cocoon-pyramid.png"/>

It is correct from "src/documentation..." onwards, but the first part
doesn't look right.

-Steve

--
View this message in context: http://www.nabble.com/PDF-not-working-correctly-in-deployed-WAR-file-on-Tomcat-tp15295911p15353067.html
Sent from the Apache Forrest - Users mailing list archive at Nabble.com.


thorsten at apache

Feb 9, 2008, 6:09 AM

Post #11 of 24 (922 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

On Fri, 2008-02-08 at 02:57 -0800, SteveOdlind wrote:
>
> Thorsten Scherler wrote:
> >
> >
> >>Please do the following:
> >>- request instead of FILE.pdf FILE.fo
> >>e.g. http://localhost:8080/my-project/samples-b/ascii-art.fo
> >>- search for fo:external-graphic and copy the tag here in this list.
> >>e.g. <fo:external-graphic
> >>src="context:///project/src/documentation/content/xdocs/samples-b/cocoon-pyramid.png"/>
> >
> >>This way we/you can see the location referenced and whether they exist
> >>in this location.
> >
> >
>
> The external-graphic tag is:
>
> <fo:external-graphic
> src="context:/\/project/src/documentation/content/xdocs/samples/cocoon-pyramid.png"/>
>
> It is correct from "src/documentation..." onwards, but the first part
> doesn't look right.


Hmm, yeah that really looks ugly. AFAIR \ is an escape character for
many os and regexp. Weird that it is switched in your case.

Did you try in jetty?

We need to look in the fo xsl, whether we have OS specific code. BTW are
you on linux or windows?

salu2
--
Thorsten Scherler thorsten.at.apache.org
Open Source Java consulting, training and solutions


steve.odlind at btinternet

Feb 11, 2008, 9:37 AM

Post #12 of 24 (922 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

>Did you try in jetty?

Yes. The external-graphic tag in Jetty is:

<fo:external-graphic
src="C:\Forrest_Test\test/src/documentation/content/xdocs/samples/cocoon-pyramid.png"/>

>We need to look in the fo xsl, whether we have OS specific code. BTW are
>you on linux or windows?

I am using Windows Vista, but I had exactly the same problem on Windows XP.

-Steve



--
View this message in context: http://www.nabble.com/PDF-not-working-correctly-in-deployed-WAR-file-on-Tomcat-tp15295911p15416593.html
Sent from the Apache Forrest - Users mailing list archive at Nabble.com.


steve.odlind at btinternet

Feb 28, 2008, 2:35 AM

Post #13 of 24 (920 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

Hi all,

If there is no quick fix to get images in PDFs displayed in deployed WAR
files, is there a way of getting PDFs to be displayed at all when the webapp
directory is deployed on Tomcat?

I have deployed the webapp directory on Tomcat, and the HTML is displayed
fine. However, clicking on the PDF icon gives the error message "Resource
Not Found".

There are no error messages when I run the command "forrest run-webapp".
Everything seems to be built correctly.

If I manually copy the PDFs to the
"build\webapp\project\src\documentation\content\xdocs\" folder then the PDFs
are displayed. But surely this can't be the correct way?

Any ideas?

-Steve
--
View this message in context: http://www.nabble.com/PDF-not-working-correctly-in-deployed-WAR-file-on-Tomcat-tp15295911p15733654.html
Sent from the Apache Forrest - Users mailing list archive at Nabble.com.


thorsten.scherler.ext at juntadeandalucia

Mar 3, 2008, 12:56 AM

Post #14 of 24 (921 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

On Thu, 2008-02-28 at 02:35 -0800, SteveOdlind wrote:
> Hi all,
>
> If there is no quick fix to get images in PDFs displayed in deployed WAR
> files, is there a way of getting PDFs to be displayed at all when the webapp
> directory is deployed on Tomcat?

Hmm, my problem with this issue is that I cannot test it (in linux it
works fine). In any way the images in pdf are quite hacky and lately
they have been done some work on the pdf plugin to overcome this
problem.

>
> I have deployed the webapp directory on Tomcat, and the HTML is displayed
> fine. However, clicking on the PDF icon gives the error message "Resource
> Not Found".
>
> There are no error messages when I run the command "forrest run-webapp".
> Everything seems to be built correctly.
>
> If I manually copy the PDFs to the
> "build\webapp\project\src\documentation\content\xdocs\" folder then the PDFs
> are displayed. But surely this can't be the correct way?
>
> Any ideas?

I expect that the solution is updating the pdf plugin to 0.3 of trunk
but since https://issues.apache.org/jira/browse/FOR-1074 I cannot ask
you test but you may watch this issue and try as soon we fixed it.

salu2


>
> -Steve
--
Thorsten Scherler thorsten.at.apache.org
Open Source Java consulting, training and solutions


tibetoine at gmail

Nov 27, 2008, 5:20 AM

Post #15 of 24 (920 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

Hi all,

I have exacty the same issue ...

I'm using forrest 0.8.
My site is in a webapp runing on Tomcat 6.0.18 with Java 1.6

I tried with PNG --> My images aren't displayed on PDF
I tried with JPG --> My images aren't displayed on PDF

My links to images are relatives (e.g: src="../resources/anImage.jpg")

And when i look in my .fo i have :
fo:external-graphic
src="context:///project/src/documentation/content/xdocs/mySpecificProject/conception/specificModule/fonctionnal/../resource/anImage.jpg"

This external-graphic FO link doesn't seem correct.


And when I take a look to the "document-to-fo.xsl" which is in my specific
skin folder i see that :

<xsl:variable name="imgpath">
<xsl:choose>
<!-- resources image dir -->
<xsl:when test="starts-with(string(@src),'images/')">
<xsl:value-of
select="concat($imagesdir,substring-after(@src,'images'))"/>
</xsl:when>
<xsl:when test="contains(string(@src),'/images/')">
<xsl:value-of
select="concat($imagesdir,substring-after(@src,'/images'))"/>
</xsl:when>
<!-- already absolute -->
<xsl:when test="contains(string(@src),':') or
starts-with(string(@src),'/')">
<xsl:value-of select="@src"/>
</xsl:when>
<!-- relative to document -->
<xsl:otherwise>
<xsl:value-of select="concat($xmlbasedir,@src)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<fo:external-graphic src="{$imgpath}">

And I can't figure where xmlbasedir is set ?!

So I guess xmlbasedir is wrong when runing in webapp mode ?!





Thorsten Scherler-3 wrote:
>
> On Thu, 2008-02-28 at 02:35 -0800, SteveOdlind wrote:
>> Hi all,
>>
>> If there is no quick fix to get images in PDFs displayed in deployed WAR
>> files, is there a way of getting PDFs to be displayed at all when the
>> webapp
>> directory is deployed on Tomcat?
>
> Hmm, my problem with this issue is that I cannot test it (in linux it
> works fine). In any way the images in pdf are quite hacky and lately
> they have been done some work on the pdf plugin to overcome this
> problem.
>
>>
>> I have deployed the webapp directory on Tomcat, and the HTML is displayed
>> fine. However, clicking on the PDF icon gives the error message "Resource
>> Not Found".
>>
>> There are no error messages when I run the command "forrest run-webapp".
>> Everything seems to be built correctly.
>>
>> If I manually copy the PDFs to the
>> "build\webapp\project\src\documentation\content\xdocs\" folder then the
>> PDFs
>> are displayed. But surely this can't be the correct way?
>>
>> Any ideas?
>
> I expect that the solution is updating the pdf plugin to 0.3 of trunk
> but since https://issues.apache.org/jira/browse/FOR-1074 I cannot ask
> you test but you may watch this issue and try as soon we fixed it.
>
> salu2
>
>
>>
>> -Steve
> --
> Thorsten Scherler thorsten.at.apache.org
> Open Source Java consulting, training and solutions
>
>
>

--
View this message in context: http://www.nabble.com/PDF-not-working-correctly-in-deployed-WAR-file-on-Tomcat-tp15295911p20719173.html
Sent from the Apache Forrest - Users mailing list archive at Nabble.com.


tibetoine at gmail

Nov 27, 2008, 8:44 AM

Post #16 of 24 (923 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

I found logs about this error , here is a line from this logs :

http-8080-1/ExternalGraphic: Error while creating area : Error with image
URL:
context:/project/src/documentation/content/xdocs/specificProject/conception/specificModule/fonctionnal/resource/anImage.jpg
(No such file or directory) and no base URL is specified

Google told me that context:// is a cocoon protocol (get a resource using
the servlet context)

So in my opinion error could be the fact that we try to reach
context:/project/.../anImage.jpg instead of
context:///project/../anImage.jpg

Or that
/project/src/documentation/content/xdocs/specificProject/conception/specificModule/fonctionnal/resource/anImage.jpg
is not in the "servlet context"..


What's more I tried all of this with the forrest sample and with jre 1.6
with apache-tomcat-0.6.18 on Windows (this time) and i have exactly the same
issue...

So you should be able to reproduce this issue easly at your home with
Windows/Unix , tomcat 6.0.18, java 1.6 and a war version (from forrest war).

PS: I tried with jimi-1.0.jar , and I have exactly the same issue
PS2: I tried with GIF, PNG and JPG image , and I have exactly the same Issue


ARobert wrote:
>
> Hi all,
>
> I have exacty the same issue ...
>
> I'm using forrest 0.8.
> My site is in a webapp runing on Tomcat 6.0.18 with Java 1.6
>
> I tried with PNG --> My images aren't displayed on PDF
> I tried with JPG --> My images aren't displayed on PDF
>
> My links to images are relatives (e.g: src="../resources/anImage.jpg")
>
> And when i look in my .fo i have :
> fo:external-graphic
> src="context:///project/src/documentation/content/xdocs/mySpecificProject/conception/specificModule/fonctionnal/../resource/anImage.jpg"
>
> This external-graphic FO link doesn't seem correct.
>
>
> And when I take a look to the "document-to-fo.xsl" which is in my specific
> skin folder i see that :
>
> <xsl:variable name="imgpath">
> <xsl:choose>
> <!-- resources image dir -->
> <xsl:when test="starts-with(string(@src),'images/')">
> <xsl:value-of
> select="concat($imagesdir,substring-after(@src,'images'))"/>
> </xsl:when>
> <xsl:when test="contains(string(@src),'/images/')">
> <xsl:value-of
> select="concat($imagesdir,substring-after(@src,'/images'))"/>
> </xsl:when>
> <!-- already absolute -->
> <xsl:when test="contains(string(@src),':') or
> starts-with(string(@src),'/')">
> <xsl:value-of select="@src"/>
> </xsl:when>
> <!-- relative to document -->
> <xsl:otherwise>
> <xsl:value-of select="concat($xmlbasedir,@src)"/>
> </xsl:otherwise>
> </xsl:choose>
> </xsl:variable>
> <fo:external-graphic src="{$imgpath}">
>
> And I can't figure where xmlbasedir is set ?!
>
> So I guess xmlbasedir is wrong when runing in webapp mode ?!
>
>
>
>
>
> Thorsten Scherler-3 wrote:
>>
>> On Thu, 2008-02-28 at 02:35 -0800, SteveOdlind wrote:
>>> Hi all,
>>>
>>> If there is no quick fix to get images in PDFs displayed in deployed WAR
>>> files, is there a way of getting PDFs to be displayed at all when the
>>> webapp
>>> directory is deployed on Tomcat?
>>
>> Hmm, my problem with this issue is that I cannot test it (in linux it
>> works fine). In any way the images in pdf are quite hacky and lately
>> they have been done some work on the pdf plugin to overcome this
>> problem.
>>
>>>
>>> I have deployed the webapp directory on Tomcat, and the HTML is
>>> displayed
>>> fine. However, clicking on the PDF icon gives the error message
>>> "Resource
>>> Not Found".
>>>
>>> There are no error messages when I run the command "forrest run-webapp".
>>> Everything seems to be built correctly.
>>>
>>> If I manually copy the PDFs to the
>>> "build\webapp\project\src\documentation\content\xdocs\" folder then the
>>> PDFs
>>> are displayed. But surely this can't be the correct way?
>>>
>>> Any ideas?
>>
>> I expect that the solution is updating the pdf plugin to 0.3 of trunk
>> but since https://issues.apache.org/jira/browse/FOR-1074 I cannot ask
>> you test but you may watch this issue and try as soon we fixed it.
>>
>> salu2
>>
>>
>>>
>>> -Steve
>> --
>> Thorsten Scherler thorsten.at.apache.org
>> Open Source Java consulting, training and solutions
>>
>>
>>
>
>

--
View this message in context: http://www.nabble.com/PDF-not-working-correctly-in-deployed-WAR-file-on-Tomcat-tp15295911p20722286.html
Sent from the Apache Forrest - Users mailing list archive at Nabble.com.


tibetoine at gmail

Dec 2, 2008, 12:14 AM

Post #17 of 24 (921 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

Hi guys !

Did someone take a look on this issue ? Are you reproducing ?

Thanks


ARobert wrote:
>
> I found logs about this error , here is a line from this logs :
>
> http-8080-1/ExternalGraphic: Error while creating area : Error with image
> URL:
> context:/project/src/documentation/content/xdocs/specificProject/conception/specificModule/fonctionnal/resource/anImage.jpg
> (No such file or directory) and no base URL is specified
>
> Google told me that context:// is a cocoon protocol (get a resource using
> the servlet context)
>
> So in my opinion error could be the fact that we try to reach
> context:/project/.../anImage.jpg instead of
> context:///project/../anImage.jpg
>
> Or that
> /project/src/documentation/content/xdocs/specificProject/conception/specificModule/fonctionnal/resource/anImage.jpg
> is not in the "servlet context"..
>
>
> What's more I tried all of this with the forrest sample and with jre 1.6
> with apache-tomcat-0.6.18 on Windows (this time) and i have exactly the
> same issue...
>
> So you should be able to reproduce this issue easly at your home with
> Windows/Unix , tomcat 6.0.18, java 1.6 and a war version (from forrest
> war).
>
> PS: I tried with jimi-1.0.jar , and I have exactly the same issue
> PS2: I tried with GIF, PNG and JPG image , and I have exactly the same
> Issue
>
>
> ARobert wrote:
>>
>> Hi all,
>>
>> I have exacty the same issue ...
>>
>> I'm using forrest 0.8.
>> My site is in a webapp runing on Tomcat 6.0.18 with Java 1.6
>>
>> I tried with PNG --> My images aren't displayed on PDF
>> I tried with JPG --> My images aren't displayed on PDF
>>
>> My links to images are relatives (e.g: src="../resources/anImage.jpg")
>>
>> And when i look in my .fo i have :
>> fo:external-graphic
>> src="context:///project/src/documentation/content/xdocs/mySpecificProject/conception/specificModule/fonctionnal/../resource/anImage.jpg"
>>
>> This external-graphic FO link doesn't seem correct.
>>
>>
>> And when I take a look to the "document-to-fo.xsl" which is in my
>> specific skin folder i see that :
>>
>> <xsl:variable name="imgpath">
>> <xsl:choose>
>> <!-- resources image dir -->
>> <xsl:when test="starts-with(string(@src),'images/')">
>> <xsl:value-of
>> select="concat($imagesdir,substring-after(@src,'images'))"/>
>> </xsl:when>
>> <xsl:when test="contains(string(@src),'/images/')">
>> <xsl:value-of
>> select="concat($imagesdir,substring-after(@src,'/images'))"/>
>> </xsl:when>
>> <!-- already absolute -->
>> <xsl:when test="contains(string(@src),':') or
>> starts-with(string(@src),'/')">
>> <xsl:value-of select="@src"/>
>> </xsl:when>
>> <!-- relative to document -->
>> <xsl:otherwise>
>> <xsl:value-of select="concat($xmlbasedir,@src)"/>
>> </xsl:otherwise>
>> </xsl:choose>
>> </xsl:variable>
>> <fo:external-graphic src="{$imgpath}">
>>
>> And I can't figure where xmlbasedir is set ?!
>>
>> So I guess xmlbasedir is wrong when runing in webapp mode ?!
>>
>>
>>
>>
>>
>> Thorsten Scherler-3 wrote:
>>>
>>> On Thu, 2008-02-28 at 02:35 -0800, SteveOdlind wrote:
>>>> Hi all,
>>>>
>>>> If there is no quick fix to get images in PDFs displayed in deployed
>>>> WAR
>>>> files, is there a way of getting PDFs to be displayed at all when the
>>>> webapp
>>>> directory is deployed on Tomcat?
>>>
>>> Hmm, my problem with this issue is that I cannot test it (in linux it
>>> works fine). In any way the images in pdf are quite hacky and lately
>>> they have been done some work on the pdf plugin to overcome this
>>> problem.
>>>
>>>>
>>>> I have deployed the webapp directory on Tomcat, and the HTML is
>>>> displayed
>>>> fine. However, clicking on the PDF icon gives the error message
>>>> "Resource
>>>> Not Found".
>>>>
>>>> There are no error messages when I run the command "forrest
>>>> run-webapp".
>>>> Everything seems to be built correctly.
>>>>
>>>> If I manually copy the PDFs to the
>>>> "build\webapp\project\src\documentation\content\xdocs\" folder then the
>>>> PDFs
>>>> are displayed. But surely this can't be the correct way?
>>>>
>>>> Any ideas?
>>>
>>> I expect that the solution is updating the pdf plugin to 0.3 of trunk
>>> but since https://issues.apache.org/jira/browse/FOR-1074 I cannot ask
>>> you test but you may watch this issue and try as soon we fixed it.
>>>
>>> salu2
>>>
>>>
>>>>
>>>> -Steve
>>> --
>>> Thorsten Scherler thorsten.at.apache.org
>>> Open Source Java consulting, training and solutions
>>>
>>>
>>>
>>
>>
>
>

--
View this message in context: http://www.nabble.com/PDF-not-working-correctly-in-deployed-WAR-file-on-Tomcat-tp15295911p20787792.html
Sent from the Apache Forrest - Users mailing list archive at Nabble.com.


crossley at apache

Dec 2, 2008, 4:32 PM

Post #18 of 24 (920 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

ARobert wrote:
>
> Hi guys !
>
> Did someone take a look on this issue ? Are you reproducing ?

There has been work done on the PDF plugin. However, i think
that you would need to be using the 0.9-dev trunk to take
advantage.

Have you done all the things suggested earlier in this thread?
Do you see the same problems with the "forrest seed" sample site?

Anyway, if it still persists after trying the 0.9-dev
then i suggest raising the issue on the "dev" mail list.

-David


tibetoine at gmail

Dec 2, 2008, 4:42 PM

Post #19 of 24 (920 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

Hi thanks for your answer !

Yes I tried verything !

What's more I think every one can see this error quite easily, since you
only need to do that
On any OS, on any browser
1/ Download apache-forrest-0.8 (Actual release)
2/ Downlaod apache-tomcat-6-0.18 (Actual release)
3/ Use java 1.6 (Actual release)
4/ forrest seed (To create sample forrest site)
5/ forrest war (to create WAR sample forrest site)
6/ put the .war in the tomcat webapps folder
7/ Launch sample forrest application from tomcat
8/ Go to any page with any image of this war sample forrest site
9/ Try to see it in PDF version
10/ See that you don't have image displayed

That take about 10 minutes (After having download Tomcat, apache and java
1.6)

David Crossley wrote:
>
> ARobert wrote:
>>
>> Hi guys !
>>
>> Did someone take a look on this issue ? Are you reproducing ?
>
> There has been work done on the PDF plugin. However, i think
> that you would need to be using the 0.9-dev trunk to take
> advantage.
>
> Have you done all the things suggested earlier in this thread?
> Do you see the same problems with the "forrest seed" sample site?
>
> Anyway, if it still persists after trying the 0.9-dev
> then i suggest raising the issue on the "dev" mail list.
>
> -David
>
>

--
View this message in context: http://www.nabble.com/PDF-not-working-correctly-in-deployed-WAR-file-on-Tomcat-tp15295911p20804329.html
Sent from the Apache Forrest - Users mailing list archive at Nabble.com.


crossley at apache

Dec 2, 2008, 4:55 PM

Post #20 of 24 (919 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

ARobert wrote:
>
> Hi thanks for your answer !
>
> Yes I tried verything !

So you are saying that you have tried 0.9-dev
and it is broken too.

I will not be commenting anymore on the user list
about this issue.

-David

> What's more I think every one can see this error quite easily, since you
> only need to do that
> On any OS, on any browser
> 1/ Download apache-forrest-0.8 (Actual release)
> 2/ Downlaod apache-tomcat-6-0.18 (Actual release)
> 3/ Use java 1.6 (Actual release)
> 4/ forrest seed (To create sample forrest site)
> 5/ forrest war (to create WAR sample forrest site)
> 6/ put the .war in the tomcat webapps folder
> 7/ Launch sample forrest application from tomcat
> 8/ Go to any page with any image of this war sample forrest site
> 9/ Try to see it in PDF version
> 10/ See that you don't have image displayed
>
> That take about 10 minutes (After having download Tomcat, apache and java
> 1.6)
>
> David Crossley wrote:
> >
> > ARobert wrote:
> >>
> >> Hi guys !
> >>
> >> Did someone take a look on this issue ? Are you reproducing ?
> >
> > There has been work done on the PDF plugin. However, i think
> > that you would need to be using the 0.9-dev trunk to take
> > advantage.
> >
> > Have you done all the things suggested earlier in this thread?
> > Do you see the same problems with the "forrest seed" sample site?
> >
> > Anyway, if it still persists after trying the 0.9-dev
> > then i suggest raising the issue on the "dev" mail list.
> >
> > -David


tibetoine at gmail

Dec 3, 2008, 12:20 AM

Post #21 of 24 (923 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

Why should I test 0.9-dev ... I'm talking about the official current release
!
I don't want to test the 0.9-dev version, since it's a dev version ....

I need forrest in a company context, and I can't install a dev version.

IMYO forrest 0.8 should be fully fonctional with current products releases
(Tomcat, etc.), and this issue should be in JIRA

I will add it, as soon as possible

Thanks

David Crossley wrote:
>
> ARobert wrote:
>>
>> Hi thanks for your answer !
>>
>> Yes I tried verything !
>
> So you are saying that you have tried 0.9-dev
> and it is broken too.
>
> I will not be commenting anymore on the user list
> about this issue.
>
> -David
>
>> What's more I think every one can see this error quite easily, since you
>> only need to do that
>> On any OS, on any browser
>> 1/ Download apache-forrest-0.8 (Actual release)
>> 2/ Downlaod apache-tomcat-6-0.18 (Actual release)
>> 3/ Use java 1.6 (Actual release)
>> 4/ forrest seed (To create sample forrest site)
>> 5/ forrest war (to create WAR sample forrest site)
>> 6/ put the .war in the tomcat webapps folder
>> 7/ Launch sample forrest application from tomcat
>> 8/ Go to any page with any image of this war sample forrest site
>> 9/ Try to see it in PDF version
>> 10/ See that you don't have image displayed
>>
>> That take about 10 minutes (After having download Tomcat, apache and java
>> 1.6)
>>
>> David Crossley wrote:
>> >
>> > ARobert wrote:
>> >>
>> >> Hi guys !
>> >>
>> >> Did someone take a look on this issue ? Are you reproducing ?
>> >
>> > There has been work done on the PDF plugin. However, i think
>> > that you would need to be using the 0.9-dev trunk to take
>> > advantage.
>> >
>> > Have you done all the things suggested earlier in this thread?
>> > Do you see the same problems with the "forrest seed" sample site?
>> >
>> > Anyway, if it still persists after trying the 0.9-dev
>> > then i suggest raising the issue on the "dev" mail list.
>> >
>> > -David
>
>

--
View this message in context: http://www.nabble.com/PDF-not-working-correctly-in-deployed-WAR-file-on-Tomcat-tp15295911p20808629.html
Sent from the Apache Forrest - Users mailing list archive at Nabble.com.


thomas.witteriede at freenet

Dec 3, 2008, 6:30 AM

Post #22 of 24 (927 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

ARobert schrieb:
> Why should I test 0.9-dev ... I'm talking about the official current release
> !
> I don't want to test the 0.9-dev version, since it's a dev version ....
>
> I need forrest in a company context, and I can't install a dev version.
>
> IMYO forrest 0.8 should be fully fonctional with current products releases
> (Tomcat, etc.), and this issue should be in JIRA
>
> I will add it, as soon as possible
>
> Thanks
>
> David Crossley wrote:
>
>> ARobert wrote:
>>
>>> Hi thanks for your answer !
>>>
>>> Yes I tried verything !
>>>
>> So you are saying that you have tried 0.9-dev
>> and it is broken too.
>>
>> I will not be commenting anymore on the user list
>> about this issue.
>>
>> -David
>>
>>
>>> What's more I think every one can see this error quite easily, since you
>>> only need to do that
>>> On any OS, on any browser
>>> 1/ Download apache-forrest-0.8 (Actual release)
>>> 2/ Downlaod apache-tomcat-6-0.18 (Actual release)
>>> 3/ Use java 1.6 (Actual release)
>>> 4/ forrest seed (To create sample forrest site)
>>> 5/ forrest war (to create WAR sample forrest site)
>>> 6/ put the .war in the tomcat webapps folder
>>> 7/ Launch sample forrest application from tomcat
>>> 8/ Go to any page with any image of this war sample forrest site
>>> 9/ Try to see it in PDF version
>>> 10/ See that you don't have image displayed
>>>
>>> That take about 10 minutes (After having download Tomcat, apache and java
>>> 1.6)
>>>
>>> David Crossley wrote:
>>>
>>>> ARobert wrote:
>>>>
>>>>> Hi guys !
>>>>>
>>>>> Did someone take a look on this issue ? Are you reproducing ?
>>>>>
>>>> There has been work done on the PDF plugin. However, i think
>>>> that you would need to be using the 0.9-dev trunk to take
>>>> advantage.
>>>>
>>>> Have you done all the things suggested earlier in this thread?
>>>> Do you see the same problems with the "forrest seed" sample site?
>>>>
>>>> Anyway, if it still persists after trying the 0.9-dev
>>>> then i suggest raising the issue on the "dev" mail list.
>>>>
>>>> -David
>>>>
Hi!
I had trouble with the PDF output as well (in Forrest 0.8) when I tried
to use images scanned from A4 paper in full size. I had to reduce the
resolution of the images down to approx. 840 x 1140 pixels in order to
have them included in the PDF. This happened when I tried to generate my
static forrest site offline for upload but may have the same root cause
as with the WAR deployment. I am using WinXP SP3 and Java 1.6 for
building my site.

Best regards
Thomas


rgardler at apache

Dec 3, 2008, 4:54 PM

Post #23 of 24 (921 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

On 3 Dec 2008, at 08:20, ARobert wrote:

>
> Why should I test 0.9-dev ... I'm talking about the official current
> release
> !
> I don't want to test the 0.9-dev version, since it's a dev
> version ....
>
> I need forrest in a company context, and I can't install a dev
> version.
>
> IMYO forrest 0.8 should be fully fonctional with current products
> releases
> (Tomcat, etc.), and this issue should be in JIRA

0.8 was tested against tomcat before it was released. It worked at
that time.

It might be that recent changes in components used in the plugin
pipeline have since broken the release. Whilst it would be great if
this never happened we cannot possibly track every single project and
system configuration. Demanding that "0.8 should be fully functional
with current product releases" helps nobody..

Helping us solve the problem will result an increased attention from
the developers. We are not here to provide free support for your
company we are here because we have specific needs and since none of
us are hitting the problem you describe you can be pretty sure our
needs are not aligned with your own (although some people here will
happily focus solely on your problem if you want to pay them).

If you would be so kind as to raise the JIRA issue as you suggest, add
as much detail as you can from your own experiences and the
discussions earlier in this thread, and also attach to it information
about whether you see the same behaviour in 0.9-dev it would be very
helpful.

We are not saying that you should run 0.9-dev (although many people
do), we are asking you to help narrow down whether this is an issue
that affects 0.8 on your system configuration alone, or whether it
still remains in 0.9. The more you help us the more we can help you,
but please don't expect us to fix your problems for you, this is open
source not free labour.

Ross


>
>
> I will add it, as soon as possible
>
> Thanks
>
> David Crossley wrote:
>>
>> ARobert wrote:
>>>
>>> Hi thanks for your answer !
>>>
>>> Yes I tried verything !
>>
>> So you are saying that you have tried 0.9-dev
>> and it is broken too.
>>
>> I will not be commenting anymore on the user list
>> about this issue.
>>
>> -David
>>
>>> What's more I think every one can see this error quite easily,
>>> since you
>>> only need to do that
>>> On any OS, on any browser
>>> 1/ Download apache-forrest-0.8 (Actual release)
>>> 2/ Downlaod apache-tomcat-6-0.18 (Actual release)
>>> 3/ Use java 1.6 (Actual release)
>>> 4/ forrest seed (To create sample forrest site)
>>> 5/ forrest war (to create WAR sample forrest site)
>>> 6/ put the .war in the tomcat webapps folder
>>> 7/ Launch sample forrest application from tomcat
>>> 8/ Go to any page with any image of this war sample forrest site
>>> 9/ Try to see it in PDF version
>>> 10/ See that you don't have image displayed
>>>
>>> That take about 10 minutes (After having download Tomcat, apache
>>> and java
>>> 1.6)
>>>
>>> David Crossley wrote:
>>>>
>>>> ARobert wrote:
>>>>>
>>>>> Hi guys !
>>>>>
>>>>> Did someone take a look on this issue ? Are you reproducing ?
>>>>
>>>> There has been work done on the PDF plugin. However, i think
>>>> that you would need to be using the 0.9-dev trunk to take
>>>> advantage.
>>>>
>>>> Have you done all the things suggested earlier in this thread?
>>>> Do you see the same problems with the "forrest seed" sample site?
>>>>
>>>> Anyway, if it still persists after trying the 0.9-dev
>>>> then i suggest raising the issue on the "dev" mail list.
>>>>
>>>> -David
>>
>>
>
> --
> View this message in context: http://www.nabble.com/PDF-not-working-correctly-in-deployed-WAR-file-on-Tomcat-tp15295911p20808629.html
> Sent from the Apache Forrest - Users mailing list archive at
> Nabble.com.
>


tibetoine at gmail

Dec 4, 2008, 12:43 AM

Post #24 of 24 (924 views)
Permalink
Re: PDF not working correctly in deployed WAR file on Tomcat [In reply to]

Ok thanks for your answer ...

I will continue to talk about that on the JIRA issue i opened
https://issues.apache.org/jira/browse/FOR-1133

Thanks


rgardler wrote:
>
>
> On 3 Dec 2008, at 08:20, ARobert wrote:
>
>>
>> Why should I test 0.9-dev ... I'm talking about the official current
>> release
>> !
>> I don't want to test the 0.9-dev version, since it's a dev
>> version ....
>>
>> I need forrest in a company context, and I can't install a dev
>> version.
>>
>> IMYO forrest 0.8 should be fully fonctional with current products
>> releases
>> (Tomcat, etc.), and this issue should be in JIRA
>
> 0.8 was tested against tomcat before it was released. It worked at
> that time.
>
> It might be that recent changes in components used in the plugin
> pipeline have since broken the release. Whilst it would be great if
> this never happened we cannot possibly track every single project and
> system configuration. Demanding that "0.8 should be fully functional
> with current product releases" helps nobody..
>
> Helping us solve the problem will result an increased attention from
> the developers. We are not here to provide free support for your
> company we are here because we have specific needs and since none of
> us are hitting the problem you describe you can be pretty sure our
> needs are not aligned with your own (although some people here will
> happily focus solely on your problem if you want to pay them).
>
> If you would be so kind as to raise the JIRA issue as you suggest, add
> as much detail as you can from your own experiences and the
> discussions earlier in this thread, and also attach to it information
> about whether you see the same behaviour in 0.9-dev it would be very
> helpful.
>
> We are not saying that you should run 0.9-dev (although many people
> do), we are asking you to help narrow down whether this is an issue
> that affects 0.8 on your system configuration alone, or whether it
> still remains in 0.9. The more you help us the more we can help you,
> but please don't expect us to fix your problems for you, this is open
> source not free labour.
>
> Ross
>
>
>>
>>
>> I will add it, as soon as possible
>>
>> Thanks
>>
>> David Crossley wrote:
>>>
>>> ARobert wrote:
>>>>
>>>> Hi thanks for your answer !
>>>>
>>>> Yes I tried verything !
>>>
>>> So you are saying that you have tried 0.9-dev
>>> and it is broken too.
>>>
>>> I will not be commenting anymore on the user list
>>> about this issue.
>>>
>>> -David
>>>
>>>> What's more I think every one can see this error quite easily,
>>>> since you
>>>> only need to do that
>>>> On any OS, on any browser
>>>> 1/ Download apache-forrest-0.8 (Actual release)
>>>> 2/ Downlaod apache-tomcat-6-0.18 (Actual release)
>>>> 3/ Use java 1.6 (Actual release)
>>>> 4/ forrest seed (To create sample forrest site)
>>>> 5/ forrest war (to create WAR sample forrest site)
>>>> 6/ put the .war in the tomcat webapps folder
>>>> 7/ Launch sample forrest application from tomcat
>>>> 8/ Go to any page with any image of this war sample forrest site
>>>> 9/ Try to see it in PDF version
>>>> 10/ See that you don't have image displayed
>>>>
>>>> That take about 10 minutes (After having download Tomcat, apache
>>>> and java
>>>> 1.6)
>>>>
>>>> David Crossley wrote:
>>>>>
>>>>> ARobert wrote:
>>>>>>
>>>>>> Hi guys !
>>>>>>
>>>>>> Did someone take a look on this issue ? Are you reproducing ?
>>>>>
>>>>> There has been work done on the PDF plugin. However, i think
>>>>> that you would need to be using the 0.9-dev trunk to take
>>>>> advantage.
>>>>>
>>>>> Have you done all the things suggested earlier in this thread?
>>>>> Do you see the same problems with the "forrest seed" sample site?
>>>>>
>>>>> Anyway, if it still persists after trying the 0.9-dev
>>>>> then i suggest raising the issue on the "dev" mail list.
>>>>>
>>>>> -David
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/PDF-not-working-correctly-in-deployed-WAR-file-on-Tomcat-tp15295911p20808629.html
>> Sent from the Apache Forrest - Users mailing list archive at
>> Nabble.com.
>>
>
>
>

--
View this message in context: http://www.nabble.com/PDF-not-working-correctly-in-deployed-WAR-file-on-Tomcat-tp15295911p20829353.html
Sent from the Apache Forrest - Users mailing list archive at Nabble.com.

Forrest user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.