« Return to Thread: Changing url rewriting behaviour (';jsessionid')

Re: Changing url rewriting behaviour (';jsessionid')

by Daniel Henrique Alves Lima :: Rate this Message:

Reply to Author | View in Thread


On Tue, 2009-06-30 at 00:52 +0200, André Warnier wrote:


Hi, Andre !

> 11) the filter captures the html output, and writes it to a local
> temporary file. Then it calls OOo /on this file/, and asks for a PDF
> version.  Then it picks up the PDF version, and returns this as a
> response, instead of the original.
> (and deletes the temporary files).

I've used this approach once. But at that time, we only need the html
source. Now i need the html source and all the referenced resources
(images, csss, jss and another servlets/jsps).


>
> You may want to have a look at this :
> http://code.google.com/p/jodconverter/
> (I use that one in another context - not Tomcat - and it works fine)

I'll look. Thanks.

>
> You may also have a look at "htmldoc", as an alternative to OOo to
> generate PDF from html.
>
>
> Mmmmm.  I'm thinking of a problem : if your pages contains links to
> embedded objects (like images etc..).

Yes, that is the problem.

>
> In that case it may be better if your "PDF button" points to another
> webapp, passing the original URL as a parameter. This webapp would use
> wget

I could use wget directly from a non protected servlet. But i'll prefer
a java crawler (is there any port of wget to Java ?) because other
developers use Microsoft Windows :-(

>
>
> One other issue bothers me a bit in all this : surely, you are not going
> to load OOo for each request, just to process one response page.
> So you will have to start OOo in server mode, and talk to it through
> it's UNO interface.  But how does it handle multiple concurrent requests ?

It doesn't. You have two alternatives:

1. Init just once oo server and "serialize" the access to it (throw a
linked list of task or something like that);
2. Init a "pool" of oo servers (each one in a different port) and run
each task in a different server.

We already use oo in another part of our application and it works fine.
The ideal, i think, is avoid to perform a lot of transformations online
and cache generated files as much as possible.

Thanks !



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: Changing url rewriting behaviour (';jsessionid')