Hi Oleg,

Thanks for your answere,

Yeah true, I could do that, but I feel it is a bit overkill. My client want all trafic over HTTPS, and I cant really ask them to sacrifice that . The image in itself isnt sensitive, so it could be served over http anyhow, the not so nice thing is that I would either have to ask them to allow some HTTP traffic instead of just HTTPS for the server, or ask them to set up a separate apache just serving an image.

I went with the javax.servlet.context.tempdir solution instead. It works, and I guess its not that bad a hack after all.

Personally I would put a high priority on enabling the programmer to override resource resolution (ala EntityResolver) for FOP though. This is my first encounter with FOP, but I can say for sure that I will need a way to customize this whenever using FOP. Ideally I would like to be able to put images used for rendering PDF´s under WEB-INF/. I would also like to be able to have the images for example under a J2EE security constraint, and I guess that wouldnt work either, unless FOP authenticates itself with the server =). Those are just my opinions though, and I am really not an expert in FOP.

Br - Johan

Oleg Tkachenko wrote:

Johan Åbrandt wrote:

It doesnt do the trick for me since I have no idea where any of our
customers might have decided to install their application server. Also I
am using EAR file which means that servletContext.getRealPath( string )
wouldnt do it either. I am currently looking into using the
javax.servlet.context.tempdir directory, and put the file there in
init() for later use. That solution would probably work, but I´m not
sure if I can look at myself in the mirror after such a hack...

You can also consider using kind of proxy servlet in which resolve https image. I mean:
<fo:external-graphics src="url('http://foo.bar/proxyServlet?url=https://real.url')"/>

Johan Åbrandt

Technical Project Manager
(Tekninen projektipäällikkö)
Tel. +358 9 6817 3342
Mobile. +358 40 848 8068

Profit Software Oy
Meritullinkatu 11 C
00170 Helsinki, Finland


This message and its attachments have been found clean from known viruses with three different antivirus programs.

Reply via email to