incubator-jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Dupriez" <>
Subject RE: No local images using pdf plugin
Date Wed, 15 Oct 2008 07:54:42 GMT
Hi Christian!

The problem is that the image file, to include in the PDF, is obtained by an http link (not
by reading the local file). This new http session (having your server being a client of itself)
has no user associated with it: if you have enabled some kind of authentication or security
mechanism, the image may not be served by your server to your server (building the PDF for

I solved it by opening unauthenticated HTTP accesses to image files in WEB.XML. But this may
suit everybody's security needs!


-----Original Message-----
From: Steinebach Christian [] 
Sent: mardi 14 octobre 2008 17:54
Subject: No local images using pdf plugin


I installed the pdfplugin and everything worked fine except that
local images did not show up.
I probably found the reason, but don't know how to fix it.
The file default.xsl contains the parameter

 <xsl:param name="baseJSPWikiURL">http://localhost/wiki/</xsl:param> 

When an image address does not start with http:// 
$baseJSPWikiURL is prepended (code from default.xsl)

- <xsl:choose>

- <xsl:when test="contains(@src, 'http://')">

  <xsl:value-of select="@src" /> 


- <xsl:otherwise>

  <xsl:value-of select="$baseJSPWikiURL" /> 

  <xsl:value-of select="@src" /> 



In my case the installation is not at http://localhost/wiki
and therefore a local image as in [An Image| myimage.jpg] cannot be found.
If I use the complete URL, e.g.
it works.

Is there a way to get the base url from
If not, is it possible to define a different xsl stylsheet to be used?
Or do I have to change default.xsl directly in the jar file?

         Thanks for any help
             Christian Steinebach


View raw message